mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 17:13:11 +01:00
parent
e25a87244b
commit
e02da56ad0
1 changed files with 3 additions and 2 deletions
|
@ -17,6 +17,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"sort"
|
||||
|
@ -280,7 +281,7 @@ func (handler *CommandHandler) CommandCreate(ce *CommandEvent) {
|
|||
|
||||
var roomNameEvent event.RoomNameEventContent
|
||||
err = ce.Bot.StateEvent(ce.RoomID, event.StateRoomName, "", &roomNameEvent)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, mautrix.MNotFound) {
|
||||
ce.Reply("Failed to get room name")
|
||||
return
|
||||
} else if len(roomNameEvent.Name) == 0 {
|
||||
|
@ -290,7 +291,7 @@ func (handler *CommandHandler) CommandCreate(ce *CommandEvent) {
|
|||
|
||||
var encryptionEvent event.EncryptionEventContent
|
||||
err = ce.Bot.StateEvent(ce.RoomID, event.StateEncryption, "", &encryptionEvent)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, mautrix.MNotFound) {
|
||||
ce.Reply("Failed to get room encryption status")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue