Conversation
Added: addGroupAdmin, removeGroupAdmin, changeGroupApprovalMode, blockUser, unblockUser, moveThread, onImageChange, onAdminsAdded, onAdminsRemoved, onApprovalModeChange I did this all day, because I love this library and I want to be part of it :D
|
I spent whole day for this update. Hope it will be approved :D |
Changed addGroupAdmin, removeGroupAdmin to addGroupAdmins, removeGroupAdmins
|
I think I made too many commits. If you want I will make a new pull request. |
madsmtm
left a comment
There was a problem hiding this comment.
Thanks a lot for your contribution (!!! 🎉🎉🎉 !!!), I've been wanting to make these implementations myself, but I've just been putting it off. I didn't have time to look through the whole PR, and I'm going away on another vacation for the next two weeks, but I'll look into it when I get back.
|
Actually I have problems with logging to my Facebook account by fbchat so I can't make some of this changes. When I'll fix this I'll make changes, thank you! |
|
I made it! I found request ( |
Added deleteThreads and made few fixes
Added fetchMessageInfo and fixed onImageChange when removing thread image
Added onCallStarted, onCallEnded and onUserJoinedCall but this methods are for group calls only. I can't find how to fetch private call start, I found only how to fetch private call end.
| user['profile_picture'] = {} | ||
| c_info = get_customization_info(user) | ||
| plan = graphql_to_plan(user['event_reminders']['nodes'][0]) if user.get('event_reminders') else None | ||
| plan = graphql_to_plan(user['event_reminders']['nodes'][0]) if user.get('event_reminders', dict()).get('nodes') else None |
There was a problem hiding this comment.
Be aware that user.get('event_reminders', dict()).get('nodes') can still raise an AttributeError, on data that looks like e.g:
user = {
'event_reminders': None
}But it might not be necessary to check this case
There was a problem hiding this comment.
I've never seen None in event_reminders, but maybe I'm wrong.
|
I couldn't explain what I meant, so I went ahead and changed Now all that's left is to test it all... 😦 |
Changed message searching methods to return generators and added `search`
|
I've made a bunch of tests for the methods you've added, though the |
Added:
onImageChangeWay to detect changes in the group image #315Messageobject from message IDfetchMessageInfoaddGroupAdmins,removeGroupAdmins,changeGroupApprovalMode,acceptUsersToGroup,denyUsersFromGroup,and detecting them
onAdminsAdded,onAdminsRemoved,onApprovalModeChangeblockUser,unblockUsermoveThreadsAccept request message for new contact #177deleteThreadsdeleteMessagesmuteThread,muteThreadReactions,muteThreadMentionsand unmuting
unmuteThread,unmuteThreadReactions,unmuteThreadMentionsmarkAsUnreadmarkAsReadmarkAsSpamwavesearchForMessageIDs,searchForMessagesonCallStarted,onCallEnded,onUserJoinedCallonGamePlayedPoll,PollOptionmodelscreatePoll,updatePollVotefetchPollOptionsonPollCreated,onPollVotedPlanmodelcreatePlan,editPlan,deletePlan,changePlanParticipationPlanobject from event IDfetchEventInfoonPlanCreated,onPlanEnded,onPlanEdited,onPlanParticipationsendRemoteFiles,sendLocalFiles_sendFiles