-
Notifications
You must be signed in to change notification settings - Fork 599
Update thread fields in utils.formatThread #488
Update thread fields in utils.formatThread #488
Conversation
Thanks for updating this, @mangopearapples |
You're right about adding data people won't know how to use. Should I remove them? I had somewhat considered this and ignored some properties like Are there any particular fields you should not be added? I will update docs to include description. |
isPinProtected/adminIDs/threadType/reactionsMuteMode/mentionsMuteMode |
Also, searching through the repo, it looks like formatThread is used by 3 functions: getThreadList, getThreadInfo, and searchForThread. Which of these were you able to test with the changes? Do we receive all the values in all these cases? |
@Schmavery Are doc formats like this okay? Also from what's available to me, adminIDs are members that are admins in groups in chats belonging to a Facebook group. E.g.
I was assuming mentions and reactions can be muted in the settings but maybe not. I will remove isPinProtected, reactionsMuteMode, and mentionsMuteMode. Is this okay? I have tested with |
After a bit of research, doesn't look like Facebook uses |
Great, thanks a lot for following up on this. Threadtype looks very interesting, we were using getUserInfo in a hacky way to get this info, but maybe we can switch over now. I wonder how much this overlaps with isCanonical (I never knew what a canonical thread was until now). |
DOCS.md
Outdated
| mentionsMuteMode | | | ||
| isCanonicalUser | True if the other user in a canonical thread is a user, false if the other user is a page or group. | | ||
| isCanonical | True if the thread is a private chat to a single user, false for group chats. | | ||
| isPinProtected | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be removed now? (same comment for the mutemodes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep forgot about that one. Done
…getThreadInfo doc
Thanks! |
This PR changes some of the properties in
formatThread
. I removed some deprecated fields and added the missing fields that were available in the payload but not to the user.This also somewhat resolves #485 by removing the field from the DOCS and
formatThread
Notable changes:
muteSettings
->muteUntil
: is the timestamp for which the thread is muted until. -1 is forever.canonicalFbid
lastMessageTimestamp
+lastReadTimestamp
adminIDs
threadType