01ea8fd36b69862a93d64526aab9cfe8a8055f73
Reddit's homeserver does not expose /_matrix/client/v3/rooms/{id}/joined_members
(it returns 'page not found'), so the previous fallback was always a 404.
Two replacements:
- roomToActiveChat: include timeline event senders as candidate MXIDs
alongside heroes / member-join state. /sync omits heroes for idle
rooms but always carries full sender MXIDs in any timeline events
it does return, so we recover a t2 ID whenever the delta sees a
message.
- enrichUsernames: split into three passes — apply known mappings
first (so re-created delta chats get upgraded without a restart),
then page /messages 'b' once per still-unknown room to mine a t2
from the recipient's history, then resolve any remaining raw t2s
via the bulk user_data endpoint. Failed history lookups are cached
in unresolvableRooms so we don't retry every sync.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Languages
TypeScript
96.5%
CSS
3.2%
JavaScript
0.2%