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 USER_ALLOWED_DOMAINS rule with a regex #48

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

Sender ID can be @john-doe-ministere_example.gouv.fr:agent.ministere_example.tchap.gouv.fr or @john-doe-ministere_example.gouv.fr:agent.ministere_example.tchap.gouv.fr1 or @john-doe-ministere_example.gouv.fr:agent.ministere_example.tchap.gouv.fr10 if the user recreated his account. This should be taken into account. Better to have a regex for that.