Commit Graph

149 Commits

Author SHA1 Message Date
Andrew Ferrazzutti 91af7890ac For DM checks, use ID of sender instead of channel
This is more migration away from FB's usage of user IDs as DM IDs
2022-04-23 16:51:48 -04:00
Andrew Ferrazzutti 421bba7f1f Style updates & minor fixes 2022-04-23 16:48:23 -04:00
Andrew Ferrazzutti 13cb5f87ff Fix inbound blank channel descriptions 2022-04-23 13:56:44 -04:00
Andrew Ferrazzutti 9dd11efc2d Actually apply displayname_template
Also get rid of displayname_preference until it's implemented
2022-04-23 13:55:55 -04:00
Andrew Ferrazzutti 51d02d3c34 Recreate ServiceApiClient on token refresh 2022-04-23 13:51:39 -04:00
Andrew Ferrazzutti eebcef6b08 Add config for custom device name 2022-04-20 23:47:02 -04:00
Andrew Ferrazzutti b85301d59f Don't log contents of RPC calls
It was asking for trouble
2022-04-14 04:27:23 -04:00
Andrew Ferrazzutti 0a0812515c Fix replies to relayed users' messages 2022-04-14 04:27:23 -04:00
Andrew Ferrazzutti 770b0e447b Try outbound room title & description, and work on outbound room avatar
But they fail with -203 (invalid body)
2022-04-14 04:27:23 -04:00
Andrew Ferrazzutti abf3114203 Better error handling for permission setting and privileged actions 2022-04-14 04:27:23 -04:00
Andrew Ferrazzutti 746756cc3f Improved power level bridging 2022-04-14 04:27:23 -04:00
Andrew Ferrazzutti a12efc92c4 Inbound channel photo & description 2022-04-14 04:27:23 -04:00
Andrew Ferrazzutti d843fcf5d2 Reset RPC min broadcast ID when node module resets
Otherwise, bridge module will ignore events until new broadcast ID
catches up to the old one
2022-04-13 05:19:33 -04:00
Andrew Ferrazzutti b29453a871 Awaitable / Promise cleanups 2022-04-13 05:19:33 -04:00
Andrew Ferrazzutti ecb04fc2f5 Inbound permissions & outbound power levels
Note that these only apply to OpenChannels
2022-04-13 05:19:32 -04:00
Andrew Ferrazzutti fe6df88a4b Return IDs of bridged outgoing messages instead of the chats themselves
And set an optional property in AudioAttachment to be safe
2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti aa5c066552 Prepend relayed media messages with a new message of who sent it
And keep its body text unchanged from its original
2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti 587ec98f3e Handle serializer errors on connect 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti 33a8218eee Add missing None check for outbound read receipts 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti af296510aa Reinstate outbound formatting 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti b2f9298817 Remove some apparently unused inbound formatting 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti 38d307c684 Fix sometimes-broken inbound mentions 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti b9cf30e9e6 Don't log contents of what look to be inbound deleted chats 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti 73f8792b75 Set history & join rules to match KakaoTalk behaviour 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti 2be6a761b6 Don't bridge what look to be inbound deleted chats 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti 164bb7ce10 Make emoticon alt-text property optional 2022-04-12 04:42:26 -04:00
Andrew Ferrazzutti 3bf49123f5 Better node disconnect handling 2022-04-11 14:50:20 -04:00
Andrew Ferrazzutti 383ea05432 Add read receipt handler that I forgot about 2022-04-11 04:50:39 -04:00
Andrew Ferrazzutti 09e8ceb96c Update version
And from now on, DB table updates require a new revision!
2022-04-11 00:40:10 -04:00
Andrew Ferrazzutti 0b23efd43a Remove incomplete web-based login for now 2022-04-11 00:02:12 -04:00
Andrew Ferrazzutti 68e2f70371 Remove incomplete inbound reaction handlers for now 2022-04-11 00:02:12 -04:00
Andrew Ferrazzutti 9a33f3dcf2 Use More/LessSettings instead of profile on login; add whoami command 2022-04-11 00:02:12 -04:00
Andrew Ferrazzutti 370865c2c1 Silently handle inbound "feed" messages
They seem to be pure metadata, so don't post them as messages
2022-04-10 05:07:41 -04:00
Andrew Ferrazzutti 87b41fbdcc Make another missing inbound property optional 2022-04-10 04:57:50 -04:00
Andrew Ferrazzutti e2c24c3ac5 Add missing parameter 2022-04-10 04:57:50 -04:00
Andrew Ferrazzutti c9189d17cf Inbound channel/user join/leave 2022-04-10 04:57:50 -04:00
Andrew Ferrazzutti 4a68796fdf Outbound read receipts 2022-04-10 04:38:25 -04:00
Andrew Ferrazzutti 109e9bcc67 For outgoing messages, raise error if disconnected 2022-04-10 04:38:25 -04:00
Andrew Ferrazzutti 7b96687dae Inbound read receipts
But not while backfilling
2022-04-10 04:38:25 -04:00
Andrew Ferrazzutti 4c205104a9 Inbound profile changes 2022-04-10 02:23:50 -04:00
Andrew Ferrazzutti cf83e86e78 Check that relay users are connected 2022-04-10 02:21:00 -04:00
Andrew Ferrazzutti a7a3ab694e Semicolons & commas 2022-04-10 02:19:59 -04:00
Andrew Ferrazzutti 2aace35962 Add listener for inbound client errors 2022-04-10 02:18:53 -04:00
Andrew Ferrazzutti 297697973f Catch a possible non-cancel exception when terminating Node module 2022-04-09 04:14:02 -04:00
Andrew Ferrazzutti 61d9a60704 Outgoing message redactions 2022-04-09 04:14:02 -04:00
Andrew Ferrazzutti 01a89508f6 Remove outbound typing listeners
Since KakaoTalk doesn't support typing notifications
2022-04-09 04:14:02 -04:00
Andrew Ferrazzutti 60b115bd38 Rename remote->kakaotalk and message->chat 2022-04-09 04:04:10 -04:00
Andrew Ferrazzutti f7d889486a Inbound message deletion/hiding
Treating hiding as equivalent to deletion
2022-04-09 04:04:10 -04:00
Andrew Ferrazzutti 075bf3e60f Better tracking of client event handlers 2022-04-09 04:04:10 -04:00
Andrew Ferrazzutti e94c598e3b Force-disable web-based login until it is implemented 2022-04-08 05:16:12 -04:00
Andrew Ferrazzutti 3abb296109 Sync channels from most to least recently updated 2022-04-08 05:06:09 -04:00
Andrew Ferrazzutti cf9fbc6d57 Make some more missing inbound properties optional 2022-04-08 05:05:39 -04:00
Andrew Ferrazzutti 8ac16e00fc Handle disconnections from the node module
Make the bridge module auto-reconnect to the node module in case the
latter ever crashes (or is started after the bridge module).

Also work towards more holistic auto-reconnect logic in general.
2022-04-08 05:04:46 -04:00
Andrew Ferrazzutti d452735691 Set body of media replies to what official client sets them to 2022-04-06 14:57:06 -04:00
Andrew Ferrazzutti ae9fd46bc8 Outgoing replies to replies 2022-04-06 14:33:01 -04:00
Andrew Ferrazzutti f682edb719 Add missing argument 2022-04-06 14:16:12 -04:00
Andrew Ferrazzutti 26d212fd45 Format & put mentions in reply targets 2022-04-06 14:11:15 -04:00
Andrew Ferrazzutti 84e6a5829d Outgoing mentions 2022-04-06 12:49:23 -04:00
Andrew Ferrazzutti 6867e6b349 Incoming mentions 2022-04-05 18:21:35 -04:00
Andrew Ferrazzutti 2b9c59a2af Outbound replies 2022-04-05 15:44:02 -04:00
Andrew Ferrazzutti 3ced968494 Inbound replies (and some kwarg cleanup) 2022-04-05 02:44:03 -04:00
Andrew Ferrazzutti ce5006269f Make some missing inbound properties optional 2022-04-05 02:12:51 -04:00
Andrew Ferrazzutti ada6a56135 Add missing __init__.py 2022-04-05 01:09:28 -04:00
Andrew Ferrazzutti 3dc1f2612e Minor improvements 2022-04-05 00:59:22 -04:00
Andrew Ferrazzutti d9adfe1550 Send fallback warning message for unsupported inbound message types 2022-04-05 00:54:21 -04:00
Andrew Ferrazzutti cc5f3f13c3 Fix uploading portal avatars 2022-04-04 20:13:20 -04:00
Andrew Ferrazzutti a9633118c5 Allow syncing (existing) direct chat channel by inviting puppet to DM 2022-04-04 20:07:30 -04:00
Andrew Ferrazzutti 3900e666ff Update mautrix-python & copy latest goodies from mautrix-facebook 2022-04-02 23:16:53 -04:00
Andrew Ferrazzutti c8803bc8cc Minor cleanups 2022-04-01 05:11:47 -04:00
Andrew Ferrazzutti 59ea91519a Split state into "logged in" and "connected"
Logged in = have (supposedly valid) session tokens
Connected = have an active TalkClient session
2022-04-01 05:11:46 -04:00
Andrew Ferrazzutti 15415a5eec Send multiphoto messages in order 2022-03-29 03:25:38 -04:00
Andrew Ferrazzutti d116ebefc7 Async function -> return awaitable 2022-03-29 03:25:06 -04:00
Andrew Ferrazzutti 48ff7b3ceb Inbound multiphoto, video, audio 2022-03-28 03:36:16 -04:00
Andrew Ferrazzutti ace4eefec7 Outbound media messages 2022-03-26 03:37:53 -04:00
Andrew Ferrazzutti 256c4d429a Inbound message attachments, starting with images 2022-03-24 22:09:38 -04:00
Andrew Ferrazzutti e099886eb1 Minor style changes 2022-03-23 03:15:02 -04:00
Andrew Ferrazzutti 2d9ae53d89 Add command for listing friends 2022-03-23 03:09:30 -04:00
Andrew Ferrazzutti 66262caa63 Restore forgotten channels before sending something into them 2022-03-21 01:33:22 -04:00
Andrew Ferrazzutti b9eb4ce0ac Prevent crash when quitting Python module after Node module 2022-03-21 01:14:52 -04:00
Andrew Ferrazzutti ee3daab48d Rename some login data types & variables 2022-03-21 01:11:42 -04:00
Andrew Ferrazzutti b59b8a68c3 Sync receiver of DM channel at init time for existing portal 2022-03-20 03:12:17 -04:00
Andrew Ferrazzutti 60c47e5a20 Improved syncing, cleanups 2022-03-18 03:52:55 -04:00
Andrew Ferrazzutti 491cdca7b6 Fix how DirectChat and MemoChat channels are handled 2022-03-13 00:30:29 -05:00
Andrew Ferrazzutti c7df4b1e65 Fix channel sync debug message 2022-03-12 23:27:28 -05:00
Andrew Ferrazzutti 1a947a1999 Apply chat sync limit during RPC transfer 2022-03-12 23:26:23 -05:00
Andrew Ferrazzutti 4158788496 Clean up Long
Keep it as an int in Python, and do all fancy conversions in Node
2022-03-11 20:40:33 -05:00
Andrew Ferrazzutti f5d16839a6 Minor cleanups 2022-03-11 20:40:33 -05:00
Andrew Ferrazzutti c48952a9fa Show error on startup/sync failure 2022-03-11 03:40:20 -05:00
Andrew Ferrazzutti 66b66bd27b First crack at incoming messages 2022-03-10 02:46:24 -05:00
Andrew Ferrazzutti 6e6c6f5c48 Message sending 2022-03-09 20:26:39 -05:00
Andrew Ferrazzutti 00c0090c19 Enforce non-optional ktid and kt_receiver for portal DB objects 2022-03-09 02:29:43 -05:00
Andrew Ferrazzutti f8a50f1201 Mark long commands as read 2022-03-09 02:29:43 -05:00
Andrew Ferrazzutti 0c9550841c Puppets and backfilling 2022-03-09 02:29:43 -05:00
Andrew Ferrazzutti e28694c987 Remove union operator from more dataclass fields 2022-03-09 02:29:43 -05:00
Andrew Ferrazzutti 8c2775056d Set logged-in flag after manual login
Not just after loading a session
2022-03-06 03:23:05 -05:00
Andrew Ferrazzutti bb3d7057b3 Implement logging out from the bridge
But there is no API for logging out of KakaoTalk
2022-03-06 03:23:05 -05:00
Andrew Ferrazzutti db41292be7 Remove union operator for Python <3.10 compatibility 2022-02-26 04:06:26 -05:00
Andrew Ferrazzutti b1e922a0fd Fix NormalChannelData deserialization 2022-02-26 02:21:05 -05:00
Andrew Ferrazzutti b57c74eeb6 Initial commit 2022-02-25 02:22:50 -05:00