In testing the API, I've found that /v1/rooms/:roomId/users has the same weird query behavior as the regular gitter client — that is, some users simply cannot be found, for whatever reason. For example, querying danro finds Dan Roth, but querying sql doesn't find anyone.
So I don't think we should rely on that exclusively. (Is this considered a known bug on Gitter's end?)
But — we already get some of those users anyway, as part of GetChatMessages.
So, what if we build a repository-esque class that builds a cache that fills as GetChatMessages and GetChatRoomUsers queries come in, and returns a union of those? That should make querying users slightly more reliable.
In testing the API, I've found that
/v1/rooms/:roomId/usershas the same weird query behavior as the regular gitter client — that is, some users simply cannot be found, for whatever reason. For example, queryingdanrofinds Dan Roth, but queryingsqldoesn't find anyone.So I don't think we should rely on that exclusively. (Is this considered a known bug on Gitter's end?)
But — we already get some of those users anyway, as part of
GetChatMessages.So, what if we build a repository-esque class that builds a cache that fills as
GetChatMessagesandGetChatRoomUsersqueries come in, and returns a union of those? That should make querying users slightly more reliable.