Merge branch 'fix-double-domain-again' into 'main'

Do not append domain twice when updating mailbox (again)

See merge request etke.cc/postmoogle!27
This commit is contained in:
Aine
2022-08-31 07:24:40 +00:00
2 changed files with 1 additions and 5 deletions

View File

@@ -98,9 +98,5 @@ func (b *Bot) setOption(ctx context.Context, name, value string) {
return
}
if name == roomOptionMailbox {
value = value + "@" + b.domain
}
b.SendNotice(ctx, evt.RoomID, fmt.Sprintf("`%s` of this room set to `%s`", name, value))
}

View File

@@ -11,7 +11,7 @@ func Mailbox(email string) string {
if index == -1 {
return email
}
return email[:strings.LastIndex(email, "@")]
return email[:index]
}
// Hostname returns hostname part from email address