Watch
1
0
Fork
You've already forked mautrix-discord
0
mirror of https://github.com/mautrix/discord.git synced 2026-08-23 20:34:56 -04:00
Commit graph mautrix-discord/pkg/connector/usercache.go
Author SHA1 Message Date
Skip R
5457c76a4a handlediscord: update ghost info in response to PRESENCE_UPDATE 2026-06-16 18:27:30 -07:00
Skip R
833085bd95 usercache: add self user to cache 2026-03-06 19:57:57 -08:00
Skip R
2310d2c036 usercache: rename methods
"Update" better expresses what is being done to the cache.
2026-02-06 17:55:46 -08:00
Skip R
a1d4c4cb28 usercache: return user ids that were updated 2026-02-06 17:41:54 -08:00
Skip R
d8ca44ecd9 connector: implement user cache
* Fixes the totally broken UserInfo resolution in guilds.
* Adds support for USER_UPDATE from the gateway.

Design considerations behind the user cache:

* Explicitly handle deleted user IDs by short circuiting the lookup
  logic and returning a singleton.
* The cache map is protected during HTTP requests to the Discord API.
* The nonexistence of a user is cached. This is to prevent excessive
  requests (a user can't suddenly begin existing at a given ID).

The user cache is upserted on READY, incoming messages, backfill, etc.
2026-02-06 15:43:51 -08:00