Skip to content

Commit

Permalink
Issue #1117 - deprecated messenger components removed
Browse files Browse the repository at this point in the history
  • Loading branch information
nbartels committed Mar 6, 2021
1 parent f67a1ab commit 4411540
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 105 deletions.
Expand Up @@ -163,7 +163,6 @@ enum ChangeValueEnumeration {
RATINGS_REACTION_ADD(RatingsReactionValue.class), //
RATINGS_REACTION_REMOVE(RatingsReactionValue.class), //
RATINGS_REACTION_EDIT(RatingsReactionValue.class), //
CONVERSATIONS(PageConversation.class), //
LEADGEN(PageLeadgen.class), //
// Instagram
STORY_INSIGHTS(InstagramStoryInsightsValue.class), //
Expand Down
56 changes: 0 additions & 56 deletions src/main/lombok/com/restfb/types/webhook/PageConversation.java

This file was deleted.

Expand Up @@ -46,19 +46,6 @@ public class MessageItem implements InnerMessagingItem {
@Facebook
private String mid;

/**
* Message sequence number
*
* @deprecated https://messengerblog.com/platform-updates/introducing-messenger-platform-v1-3-and-new-ways-to-drive-the-conversation/
* "Developers who previously relied on using seq ID for deduping can use mid instead, and those who were
* using it for ordering purposes can use timestamp instead."
*/
@Deprecated
@Getter
@Setter
@Facebook
private Long seq;

/**
* Text of message
*/
Expand Down
6 changes: 0 additions & 6 deletions src/test/java/com/restfb/types/WebhookMessagingTest.java
Expand Up @@ -113,7 +113,6 @@ void messagingMessageMediaAttachment() {
assertNotNull(item);
assertEquals("mid.1458696618141:b4ef9d19ec21086067", item.getMid());
assertNull(item.getText());
assertEquals(51L, item.getSeq().longValue());
assertFalse(item.hasQuickReply());
assertFalse(item.hasNlp());
assertTrue(item.hasAttachment());
Expand Down Expand Up @@ -151,7 +150,6 @@ void messagingMessageLocationAttachment() {
assertNotNull(item);
assertEquals("mid.1458696618141:b4ef9d19ec21086067", item.getMid());
assertNull(item.getText());
assertEquals(51L, item.getSeq().longValue());
assertFalse(item.hasQuickReply());
assertFalse(item.hasNlp());
assertTrue(item.hasAttachment());
Expand Down Expand Up @@ -190,7 +188,6 @@ void messagingMessageLegacyFallbackAttachment() {
assertNotNull(item);
assertEquals("mid.1458696618141:b4ef9d19ec21086067", item.getMid());
assertNull(item.getText());
assertEquals(51L, item.getSeq().longValue());
assertFalse(item.hasQuickReply());
assertFalse(item.hasNlp());
assertTrue(item.hasAttachment());
Expand Down Expand Up @@ -222,7 +219,6 @@ void messagingMessageBasic() {
assertNotNull(item);
assertEquals("mid.1457764197618:41d102a3e1ae206a38", item.getMid());
assertEquals("hello, world!", item.getText());
assertEquals(73L, item.getSeq().longValue());
assertTrue(item.getAttachments().isEmpty());
}

Expand Down Expand Up @@ -388,7 +384,6 @@ void messagingMessageBasicIsEcho() {
assertEquals("hello, world!", item.getText());
assertEquals("1517776481860111", item.getAppId());
assertEquals("DEVELOPER_DEFINED_METADATA_STRING", item.getMetadata());
assertEquals(73L, item.getSeq().longValue());
assertTrue(item.getAttachments().isEmpty());
}

Expand All @@ -411,7 +406,6 @@ void standbyMessageBasicIsEcho() {
assertEquals("hello, world!", item.getText());
assertEquals("1517776481860111", item.getAppId());
assertEquals("DEVELOPER_DEFINED_METADATA_STRING", item.getMetadata());
assertEquals(73L, item.getSeq().longValue());
assertTrue(item.getAttachments().isEmpty());
}

Expand Down
11 changes: 0 additions & 11 deletions src/test/java/com/restfb/types/WebhookTest.java
Expand Up @@ -1166,17 +1166,6 @@ public void ratingsReactionValue(RatingsReactionValue convertChangeValue) {
assertTrue(listenerTriggered.get());
}

@Test
void pageConversations() {
WebhookObject webhookObject = openJson("page-conversations-25");
Change change = webhookObject.getEntryList().get(0).getChanges().get(0);
assertEquals(FIELD_CONVERSATIONS, change.getField(), "change field");
assertEquals(change.getValue().getClass(), PageConversation.class, "change value class");
PageConversation value = (PageConversation) change.getValue();
assertEquals("1234567890321", value.getPageId(), "change page id");
assertEquals("t_id.171899099639713", value.getThreadId(), "change thread id");
}

@Test
void feedEventAdd() {
WebhookObject webhookObject = openJson("feed-event-add");
Expand Down
18 changes: 0 additions & 18 deletions src/test/resources/json/webhooks/page-conversations-25.json

This file was deleted.

0 comments on commit 4411540

Please sign in to comment.