diff --git a/bot/command_owner.go b/bot/command_owner.go index becd5fe..962b8a8 100644 --- a/bot/command_owner.go +++ b/bot/command_owner.go @@ -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)) } diff --git a/utils/utils.go b/utils/utils.go index ddc1b28..93271da 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -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