Commit Graph

1156 Commits

Author SHA1 Message Date
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
f968e583e8 Make Client.session attribute public 2020-01-09 10:55:36 +01:00
Mads Marquart
88ba9c55d2 Merge pull request #497 from carpedm20/public-session
Rename State -> Session, and make the class public.
2020-01-09 10:49:43 +01:00
Mads Marquart
6baa594538 Fix user affinity test 2020-01-09 10:49:12 +01:00
Mads Marquart
0e0fce714a Allow on_2fa_callback to be None in Session.login 2020-01-09 10:39:30 +01:00
Mads Marquart
cf24c7e8c2 Add Session and Client __repr__ implementations 2020-01-09 10:32:30 +01:00
Mads Marquart
ded6039b69 Add message-related functions to Message model 2020-01-09 01:13:27 +01:00
Mads Marquart
6b4327fa69 Add Message.session 2020-01-09 01:13:27 +01:00
Mads Marquart
53e4669fc1 Move fetch_message_info to Message 2020-01-09 01:13:27 +01:00
Mads Marquart
4dea10d5de Add thread mute settings to ThreadABC 2020-01-09 01:13:26 +01:00
Mads Marquart
bd2b39c27a Add thread actions to ThreadABC 2020-01-09 01:13:17 +01:00
Mads Marquart
e9864208ac Fix user affinity 2020-01-09 00:36:11 +01:00
Mads Marquart
f3b1d10d85 Move fetch methods to ThreadABC 2020-01-09 00:35:44 +01:00
Mads Marquart
13aa1f5e5a Move send methods to ThreadABC 2020-01-09 00:35:44 +01:00
Mads Marquart
aeca4865ae Add unfinished NewGroup helper class 2020-01-09 00:35:44 +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
64f55a572e Move group-related functions to Group model 2020-01-08 23:32:45 +01:00
Mads Marquart
a26554b4d6 Move user-related functions to User model 2020-01-08 23:23:19 +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
45c0a4772d Move attributes out of Thread and into User/Page/Group 2020-01-08 12:25:06 +01:00
Mads Marquart
a36ff5ee6e Make Session.user_id readonly 2020-01-08 12:24:47 +01:00
Mads Marquart
78949e8ad5 Update examples
Only `import fbchat`, and update to initialize Client using Session
2020-01-08 10:45:41 +01:00
Mads Marquart
06b7e14c31 Initialize Client using Session 2020-01-08 10:41:17 +01:00
Mads Marquart
41f1007936 Make Session public 2020-01-08 10:33:25 +01:00
Mads Marquart
092573fcbb Rename State -> Session 2020-01-08 10:16:40 +01:00
Mads Marquart
881aa9adce Bump version: 1.9.2 → 1.9.3 v1.9.3 2020-01-08 09:38:18 +01:00
Mads Marquart
4714be5697 Fix MQTT JSON decoding 2020-01-08 09:35:26 +01:00
Mads Marquart
cb7f4a72d7 Bump version: 1.9.1 → 1.9.2 v1.9.2 2020-01-08 08:47:16 +01:00
Mads Marquart
fb63ff0db8 Fix cookie header extraction
Only worked when the cookies were loaded from file, hence the reason I
didn't spot it the first time. Thanks to @gave92 for the suggestion.

Fixes #495
2020-01-08 08:46:22 +01:00
Mads Marquart
c5f447e20b Bump version: 1.9.0 → 1.9.1 v1.9.1 2020-01-06 13:23:39 +01:00
Mads Marquart
b4d3769fd5 Fix MQTT error handling
- Fix "Out of memory" errors
- Fix typo
2020-01-06 13:14:07 +01:00
Mads Marquart
b199d597b2 Bump version: 1.8.3 → 1.9.0 v1.9.0 2020-01-06 10:57:19 +01:00
Mads Marquart
debfb37a47 Merge pull request #494 from carpedm20/websocket-mqtt-support
Add MQTT over WebSockets support
2020-01-06 10:51:20 +01:00
Mads Marquart
67fd6ffdf6 Better document MQTT topics 2020-01-06 10:34:39 +01:00
Mads Marquart
e57265016e Skip NoOp events 2020-01-06 10:27:40 +01:00
Mads Marquart
cf4c22898c Add undocumented _onSeen callback
Mostly just to slowly document unknown events
2020-01-06 10:27:11 +01:00
Mads Marquart
3bb99541e7 Improve MQTT connection error reporting 2020-01-05 23:44:19 +01:00
Mads Marquart
8c367af0ff Fix Python 2.7 errors 2020-01-05 20:52:50 +01:00
Mads Marquart
e1c5e5e417 Merge pull request #492 from OneBlue/mark-as-read-timestamp
Add a optional timestamp parameter to mark_as_read and mark_as_unread
2020-01-05 20:51:40 +01:00
Mads Marquart
bc1e3edf17 Small fixes
Handle more errors, and fix Client.stopListening
2020-01-05 20:29:44 +01:00
Mads Marquart
e488f4a7da Fix typing status parsing
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2020-01-05 19:57:53 +01:00
Mads Marquart
afad38d8e1 Fix chat timestamp parsing 2020-01-05 19:57:53 +01:00
Mads Marquart
e9804d4184 Fix message parsing 2020-01-05 19:57:53 +01:00
Mads Marquart
a1b80a7abb Replace pull channel with MQTT setup 2020-01-05 19:57:53 +01:00
Mads Marquart
803bfa7084 Add proper MQTT error handling 2020-01-05 19:57:53 +01:00
Mads Marquart
d1cb866b44 Refactor MQTT listening 2020-01-05 19:57:52 +01:00
Mads Marquart
a298e0cf16 Refactor MQTT to do proper reconnecting 2020-01-05 14:56:01 +01:00
Mads Marquart
766b0125fb Refactor MQTT connecting, add sync token support 2020-01-05 00:31:58 +01:00