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

Do not accept invitations to a room with more than 1 other user #7

Open bolinocroustibat opened 4 months ago

bolinocroustibat commented 4 months ago

First, make sure that the bot does not accept invitations when it is a room with more than 1 other user/people.

...and later on, if Albert bot is invited to a room with more than 1 other user, ensure that he only responds when Albert bot is tagged

nrolin commented 4 months ago

First, make sure that the bot does not accept invitations when it is a room with more than 1 other user/people.

I'm not sure this is easy to do, private message is handled the same way as a room (you can even invite more people to a private conversation).

In my code I used the number of user because it's the only thing I found reliable, but there should be an other way (tchap client manages to sort it out). It would be possibly easier to join the room, then decide to immediately quit if it is not a private conversation.

ensure that he only responds when Albert bot is tagged

it should be fairly easy with https://code.peren.fr/open-source/tchapbot/-/merge_requests/2

bolinocroustibat commented 3 months ago

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