mail2most
mail2most copied to clipboard
Post body as thread reply
With the new Mattermost 7 default threading behavior, it would be great to split a new incoming mail into multiple messages. Mail2Most could start a new thread with each mail subject, but the body could be posted as the first reply to this thread. This way, the mail body wouldn't take up so much space, but would still remain accessible to everyone who needs to read it.
That sounds like a great idea :+1: . Feel free to prepare a PR since currently i don't have much time. Otherwise i will mark it and once i have some time I will take a look.
So I briefly looked into it, but I don't know Go and the tooling at all and I also won't find the time in the next two months to get started on it. I did check out the Mattermost API a bit though, so I'd briefly describe what I would do and maybe that's of help to you or someone else (or not):
I don't think you can easily post more than one message at the same time using the API. To start a thread, you therefore need to post a first message and then add this message's id to the next request as root_id
(docs).
This probably needs to happen somewhere here, one could add a bool threading
and if it's true, try posting the subject line first and then use the returned id
as the root_id
for a second request. Some form of configuration check would need to be added here as well. I guess that would more or less be it.