j3k0 / ganomede-notifications

Long-pull notification service for Ganomede
0 stars 0 forks source link

Many online lists #28

Closed j3k0 closed 7 years ago

j3k0 commented 8 years ago

The game maintains a list of the most recently seen players through the online endpoint.

https://github.com/j3k0/ganomede-notifications/tree/master#online-user-list-notificationsv1online

We will need to be able to split this list into multiple list, by adding a listid to the related endpoints.

Legacy endpoints should still work, they will then use listid = default.

The full spec is in the README.md of this branch.

https://github.com/j3k0/ganomede-notifications/tree/feature/many-online-lists#legacy-online-user-list-notificationsv1online

j3k0 commented 8 years ago

@elmigranto This task will come after bans UI and ganomede-data.

29 should probably be done before this.

elmigranto commented 8 years ago

Added multiple lists. Some caveats (let me know if any of this needs changing):

Also, figured more on why user.email is there. There is ONLINE_LIST_INVISIBLE_MATCH env var that contains RegExp. If this and present and user's email matches, we skip adding account to online list. Detailed logic.

I also removed updateListMiddleware which allows to update online lists from other endpoints. Looks like it isn't used anymore.

j3k0 commented 8 years ago

OK, so the email is only needed to hide "test bots". I once setup 2 bots that loggin / invite each others to a game / played a few move / discard the game / logout. (and send email when something fails).

Can we have the ONLINE_LIST_INVISIBLE_MATCH regex be run on the username instead of the email? (I can as easily make sure test bots have specially designed usernames, like qB1VkX8zKpcNw01 and qB1VkX8zKpcNw02 for instance).

It would be nice to remove dependency over authdb's email from here.