Commit graph

4 commits

Author SHA1 Message Date
MarkusRost
865c1eb9f4
Make Discord id length variable and fix webhook hash (#16)
* prevent duplicate user for interactions

* fix for older discord accounts

* check channel mentions against full channel list

* Fix compatibility for Python 3.7

Replace dict with Dict object from typing module

* remove scary hashing

* always expect guild_id

* change hash to djb2

* Revert "always expect guild_id"

This reverts commit dbcb3d1b9c97f6ceda0cf982b4bd7228926112c3.

* guild_id warning, don't group bot created webhooks

* fmt

Co-authored-by: Friskygote <7283122+Friskygote@users.noreply.github.com>
Co-authored-by: Wolf Gupta <e817509a-8ee9-4332-b0ad-3a6bdf9ab63f@aleeas.com>
2022-01-01 18:40:37 +05:30
git-bruh
4713a00016
cleanup
* Use websocket events to sync usernames/avatars instead of periodic syncing.

* Use caches for fetched room_ids, room state (for usernames and avatars). Also switch to using a single cache with locks.

* Don't store full message objects in cache, just store the relation of matrix event IDs to discord message IDs and vice-versa. Content can be fetched from the server instead.

* Don't rely on websocket events for mentioning Discord users, mentions are now done by mentioning the dummy matrix user. The ID to be mentioned is extracted from the MXID instead.

* General clean-ups.
2021-05-13 15:51:58 +05:30
git-bruh
78d85a2374
appservice: support messages from other webhooks 2021-04-18 18:14:18 +05:30
git-bruh
d6740b4bd3
Appservice (#4) 2021-04-17 10:15:51 +05:30