Editor can issue a report as a message
thibaultamartin opened this issue · 1 comments
thibaultamartin commented
When receiving the command !report message
in the administrator room, the bot tries to read the template. If it cannot find the template, it answers with:
I could not find or read the template
If it finds the template, it reads it and replaces the {{report}}
string with the generated report. It then answers with the generated report in the template.
The report is created as follows:
- The bot lists all sections that have at least one approved news
- For each section, the bot adds
## {{section title matching the emoji}}
then for each news:[{{displayName of the reporter}}](https://matrix.to/#/{{matrixID of the reporter}}) reports that
> {{message of thenews}}
- a line break
- Then the bot adds
## TO SORT
- For each approved news that doesn't have a section, the bot adds:
[{{displayName of the reporter}}](https://matrix.to/#/{{matrixID of the reporter}}) reports that
> {{message of thenews}}
{{link to the message}}
- a line break
The bot then issues the report as a message in the admin room
haecker-felix commented
Implemented ✔️