mail2most icon indicating copy to clipboard operation
mail2most copied to clipboard

Post body as thread reply

Open burnoutberni opened this issue 2 years ago • 2 comments

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.

burnoutberni avatar Jun 30 '22 13:06 burnoutberni

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.

c-seeger avatar Jul 01 '22 18:07 c-seeger

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.

burnoutberni avatar Jul 03 '22 17:07 burnoutberni