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

Rewrite acceptance rule for USER_ALLOWED_DOMAINS #49

Closed bolinocroustibat closed 5 months ago

bolinocroustibat commented 5 months ago

https://github.com/etalab-ia/albert-tchapbot/blob/dev/app/matrix_bot/eventparser.py#L54

Some people at DINUM couldn't use the beta bot because they had a Tchap username with a domain finishing in ministere.gouv.fr1 (when an account is recreated).

After talking with Tchap team, it appears sender ID can be like:

So the rule should take this into account. Better to write a proper regex for this.

bolinocroustibat commented 5 months ago

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