Add ListMessageSplitter and apply to rules command
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.
(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.
Thanks for taking the time to document this in the detail you have, it's much clearer now :smile_cat: