Commit Graph

75 Commits

Author SHA1 Message Date
Mads Marquart
117433da8a Improve image fetching in ThreadABC 2020-01-14 18:47:14 +01:00
Mads Marquart
7c7ac1f1f6 Clean up User parsing 2020-01-13 11:39:09 +01:00
Mads Marquart
da18111ed0 Add ThreadABC._parse_participants 2020-01-13 11:39:09 +01:00
Mads Marquart
281ef4714f Message parsing fixes 2020-01-13 10:01:24 +01:00
Mads Marquart
26f99d983e Refactor polls and poll options 2020-01-09 22:03:15 +01:00
Mads Marquart
9f1c9c9697 Remove _core.Enum and aenum dependency 2020-01-09 21:00:35 +01:00
Mads Marquart
c81e509eb0 Remove TypingStatus 2020-01-09 21:00:35 +01:00
Mads Marquart
8b6d9b16c6 Remove ThreadColor
Replaced with raw color values. In the future, we should probably
investigate using "themes"
2020-01-09 21:00:34 +01:00
Mads Marquart
3341f4a45c Remove MessageReaction 2020-01-09 19:51:06 +01:00
Mads Marquart
12c2059812 Split Message into Message/MessageData 2020-01-09 17:50:18 +01:00
Mads Marquart
a1b3fd3ffa Refactor message sending 2020-01-09 17:21:07 +01:00
Mads Marquart
483fdf43dc Split Plan into Plan/PlanData, and add Plan.session 2020-01-09 15:13:37 +01:00
Mads Marquart
2459a0251a Split Group into Group/GroupData 2020-01-09 14:09:44 +01:00
Mads Marquart
c7ee45aaca Split Page into Page/PageData 2020-01-09 14:09:33 +01:00
Mads Marquart
22217c793c Split User into User/UserData 2020-01-09 14:09:17 +01:00
Mads Marquart
906e813378 Fix frame_count tests 2020-01-09 12:30:27 +01:00
Mads Marquart
942c3e5b70 Merge pull request #499 from carpedm20/session-in-models
Add ThreadABC helper, and move a bunch of methods out of Client
2020-01-09 11:33:45 +01:00
Mads Marquart
2ec0be9635 Remove ThreadType completely 2020-01-09 11:22:28 +01:00
Mads Marquart
d8d044f091 Merge pull request #498 from carpedm20/rename-uid
Rename .uid to .id
2020-01-09 10:58:46 +01:00
Mads Marquart
6baa594538 Fix user affinity test 2020-01-09 10:49:12 +01:00
Mads Marquart
152f20027a Add ThreadABC helper, that'll contain functions that threads can call 2020-01-09 00:35:43 +01:00
Mads Marquart
4199439e07 Remove Thread.type 2020-01-08 23:52:14 +01:00
Mads Marquart
0531a9e482 Add session attribute to Group/User/Page/Thread 2020-01-08 23:11:39 +01:00
Mads Marquart
a5abb05ab3 Rename .uid -> .id everywhere 2020-01-08 23:09:51 +01:00
Mads Marquart
1f96c624e7 Combine variously sized previews to a single key 2019-12-11 16:20:38 +01:00
Mads Marquart
91d4055545 Make models use kw_only (on Python > 3.5) 2019-12-11 16:12:14 +01:00
Mads Marquart
27ae1c9f88 Stop mutating models 2019-12-11 16:12:14 +01:00
Mads Marquart
b03d0ae3b7 Allow specifying class variables in init 2019-12-11 16:12:14 +01:00
Mads Marquart
637ea97ffe Add Image model 2019-12-11 16:12:14 +01:00
Mads Marquart
e348425204 Fix black version 2019-12-11 16:11:54 +01:00
Mads Marquart
41a445a989 Add ShareAttachment subattachment tests 2019-10-28 10:33:45 +01:00
Mads Marquart
80c7fff571 Add file attachment tests 2019-10-28 10:33:04 +01:00
Mads Marquart
e2d98356ad Add poll tests 2019-10-27 14:40:09 +01:00
Mads Marquart
a8412ea3d8 Add plan tests 2019-10-27 14:40:09 +01:00
Mads Marquart
71177d8bf9 Add group test 2019-10-27 14:40:09 +01:00
Mads Marquart
5019aac6b7 Add page test 2019-10-27 14:40:09 +01:00
Mads Marquart
0c305f621a Add user tests 2019-10-27 14:40:09 +01:00
Mads Marquart
ef73bb27aa Add graphql tests 2019-10-27 14:40:09 +01:00
Mads Marquart
bd499c1ea2 Add message tests 2019-10-27 14:40:09 +01:00
Mads Marquart
24c4b10012 Add thread tests 2019-10-27 14:40:09 +01:00
Mads Marquart
648cbb4999 Add location tests, and fix live location expires_at parsing 2019-10-27 14:40:09 +01:00
Mads Marquart
ef5c86c427 Add quick reply tests 2019-10-27 14:40:09 +01:00
Mads Marquart
5e0b80cada Add sticker tests 2019-10-27 14:40:09 +01:00
Mads Marquart
9898e8cd19 Add attachment tests 2019-10-27 14:40:09 +01:00
Mads Marquart
77d9b25bf0 Add utility function tests 2019-10-27 14:40:08 +01:00
Mads Marquart
d06ff7078a Mark existing tests as online
- Remove `offline` and `expensive` markers
2019-09-10 10:59:01 +02:00
Mads Marquart
614e5ad4bb Use snake_case method names
Renamed:
- Message.formatMentions
- _util.digitToChar
- _util.generateMessageID
- _util.getSignatureID
- _util.generateOfflineThreadingID
- Client._markAlive

Renamed following Client methods:
- isLoggedIn
- getSession
- setSession
- _forcedFetch
- fetchThreads
- fetchAllUsersFromThreads
- fetchAllUsers
- searchForUsers
- searchForPages
- searchForGroups
- searchForThreads
- searchForMessageIDs
- searchForMessages
- _fetchInfo
- fetchUserInfo
- fetchPageInfo
- fetchGroupInfo
- fetchThreadInfo
- fetchThreadMessages
- fetchThreadList
- fetchUnread
- fetchUnseen
- fetchImageUrl
- fetchMessageInfo
- fetchPollOptions
- fetchPlanInfo
- _getPrivateData
- getPhoneNumbers
- getEmails
- getUserActiveStatus
- fetchThreadImages
- _oldMessage
- _doSendRequest
- quickReply
- _sendLocation
- sendLocation
- sendPinnedLocation
- _sendFiles
- sendRemoteFiles
- sendLocalFiles
- sendRemoteVoiceClips
- sendLocalVoiceClips
- forwardAttachment
- createGroup
- addUsersToGroup
- removeUserFromGroup
- _adminStatus
- addGroupAdmins
- removeGroupAdmins
- changeGroupApprovalMode
- _usersApproval
- acceptUsersToGroup
- denyUsersFromGroup
- _changeGroupImage
- changeGroupImageRemote
- changeGroupImageLocal
- changeThreadTitle
- changeNickname
- changeThreadColor
- changeThreadEmoji
- reactToMessage
- createPlan
- editPlan
- deletePlan
- changePlanParticipation
- createPoll
- updatePollVote
- setTypingStatus
- markAsDelivered
- _readStatus
- markAsRead
- markAsUnread
- markAsSeen
- friendConnect
- removeFriend
- blockUser
- unblockUser
- moveThreads
- deleteThreads
- markAsSpam
- deleteMessages
- muteThread
- unmuteThread
- muteThreadReactions
- unmuteThreadReactions
- muteThreadMentions
- unmuteThreadMentions
- _pullMessage
- _parseMessage
- _doOneListen
- setActiveStatus
- onLoggingIn
- on2FACode
- onLoggedIn
- onListening
- onListenError
- onMessage
- onColorChange
- onEmojiChange
- onTitleChange
- onImageChange
- onNicknameChange
- onAdminAdded
- onAdminRemoved
- onApprovalModeChange
- onMessageSeen
- onMessageDelivered
- onMarkedSeen
- onMessageUnsent
- onPeopleAdded
- onPersonRemoved
- onFriendRequest
- onInbox
- onTyping
- onGamePlayed
- onReactionAdded
- onReactionRemoved
- onBlock
- onUnblock
- onLiveLocation
- onCallStarted
- onCallEnded
- onUserJoinedCall
- onPollCreated
- onPollVoted
- onPlanCreated
- onPlanEnded
- onPlanEdited
- onPlanDeleted
- onPlanParticipation
- onQprimer
- onChatTimestamp
- onBuddylistOverlay
- onUnknownMesssageType
- onMessageError
2019-09-08 19:59:53 +02:00
Mads Marquart
856c1ffe0e Remove ability to control the listening loop externally
It was probably scarcely used, and separate functionality will be
developed that makes this redundant anyhow.
2019-09-08 18:44:46 +02:00
Mads Marquart
b5a37e35c6 Remove FBchatUserError in favor of builtin exceptions 2019-09-08 18:44:46 +02:00
Mads Marquart
91cf4589a5 Remove ability to set a custom User-Agent
This causes issues if the User-Agent is set to resemble a mobile phone,
see #431, and besides, it's not an API surface I want / need to support.
2019-09-08 18:44:46 +02:00