Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache room users? #75

Open
chucker opened this issue May 25, 2020 · 1 comment
Open

Cache room users? #75

chucker opened this issue May 25, 2020 · 1 comment

Comments

@chucker
Copy link

chucker commented May 25, 2020

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.

chucker pushed a commit to chucker/Gitter that referenced this issue May 30, 2020
This also adds `GitterRoomUserOptions` in the vein of `GitterMessageOptions` so we can specify options like a query and a limit (defaulting to 30).

It should be noted that this API seems to return unreliable (incomplete) results. See Blazored#75
@chucker
Copy link
Author

chucker commented Jun 3, 2020

I’ve started building this as a prototype, and it seems to work fine. The main sticking point right now is really finding a good control to add user autocomplete to the text box.

SQL-MisterMagoo pushed a commit that referenced this issue Jun 3, 2020
This also adds `GitterRoomUserOptions` in the vein of `GitterMessageOptions` so we can specify options like a query and a limit (defaulting to 30).

It should be noted that this API seems to return unreliable (incomplete) results. See #75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant