Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct fetchUnread and fetchUnseen to include 1:1 chats and group chats #394

Merged
merged 2 commits into from
Feb 18, 2019

Conversation

OneBlue
Copy link
Contributor

@OneBlue OneBlue commented Feb 11, 2019

Currently, fetchUnread() and fetchUnseen() only include 1:1 threads, and not group threads.

Example response from Facebook:

{
   '__ar':1,
   'payload':{
      'unread_thread_fbids':[
         {
            'thread_fbids':[
               '[redacted]' // <= Group chats
            ],
            'other_user_fbids':[
               '[redacted]' // <= 1:1 chats
            ],
            'thread_ids':[
               '[redacted]',
               '[redacted]'
            ],
            'folder':'inbox'
         }
      ],
      'payload_source':'server_unread_threads'
   },
   'bootloadable':{},
   'ixData':{ },
   'bxData':{},
   'gkxData':{},
   'qexData':{},
   'lid':'[redacted]'}

This pull request changes the behavior of fetchUnseen() and fetchUnread() to include both.

Copy link
Contributor

@kapi2289 kapi2289 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at the CONTRIBUTING.rst guide. Please apply the black lint.

@OneBlue
Copy link
Contributor Author

OneBlue commented Feb 11, 2019

Done !

Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks 👍

@madsmtm madsmtm merged commit dfc2d06 into fbchat-dev:master Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants