mjolnir icon indicating copy to clipboard operation
mjolnir copied to clipboard

Add ListMessageSplitter and apply to rules command

Open ShadowJonathan opened this issue 3 years ago • 2 comments

Fixes https://github.com/matrix-org/mjolnir/issues/294

This adds a class where one could add "headers" and "items", and it'll internally split it nicely to fit inside an encrypted message, allowing enormous listings to be posted to the chat.

This also alters the rules command to use this class for this.

ShadowJonathan avatar Sep 30 '22 12:09 ShadowJonathan

(A general note for maintainers) Maybe time to take a look at this adhoc string concatenation and fallback mess and instead consider using templates for the messages. I guess even duplicate templates for the text fallback is better if stripping html isn't good enough.

Gnuxie avatar Oct 04 '22 16:10 Gnuxie

Thanks for taking the time to document this in the detail you have, it's much clearer now :smile_cat:

Gnuxie avatar Oct 11 '22 15:10 Gnuxie