add 'nothreads' option, fixes #4

This commit is contained in:
Aine
2022-08-26 16:00:37 +03:00
parent 41a52c1eca
commit 42c9e15619
4 changed files with 14 additions and 1 deletions

View File

@@ -112,7 +112,7 @@ func (b *Bot) Send(ctx context.Context, email *utils.Email) error {
contentParsed := format.RenderMarkdown(text.String(), true, true)
var threadID id.EventID
if email.InReplyTo != "" {
if email.InReplyTo != "" && !settings.NoThreads() {
threadID = b.getThreadID(roomID, email.InReplyTo)
if threadID != "" {
contentParsed.SetRelatesTo(&event.RelatesTo{