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:
@@ -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))
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user