etalab-ia / albert-tchap

Bot for Tchap (the messaging app of the French State) using Albert, the French administration Artificial Intelligence agent
MIT License
13 stars 1 forks source link

Create a pending chat request list instead of "join on invite" logic #54

Closed bolinocroustibat closed 3 months ago

bolinocroustibat commented 5 months ago

Right now, when join_on_invite is set to False, the user send a message but doesn't receive any answer while he's waiting for the bot to accept teh invitation and join the salon. It's quite confusing in terms of UX.

We can replace that logic with a pending request file stored in local volume, listing the users IDs which have pending requests not yet accepted. If it's in the pending list, the bot should reply to message "Wait for your user to be accepted blah blah blah" but shouldn't interact at all except for that.

bolinocroustibat commented 5 months ago

Update:

Create a whitelist (as a txt or csv or json) so that users approved in advance don't even receive a pre-approbation message from the bot. Create a small API with the routes:

bolinocroustibat commented 5 months ago

PR: https://github.com/etalab-ia/albert-tchapbot/pull/62

dtrckd commented 3 months ago

fixed in #75