parent
e25a87244b
commit
e02da56ad0
@ -17,6 +17,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
@ -280,7 +281,7 @@ func (handler *CommandHandler) CommandCreate(ce *CommandEvent) {
|
|||||||
|
|
||||||
var roomNameEvent event.RoomNameEventContent
|
var roomNameEvent event.RoomNameEventContent
|
||||||
err = ce.Bot.StateEvent(ce.RoomID, event.StateRoomName, "", &roomNameEvent)
|
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")
|
ce.Reply("Failed to get room name")
|
||||||
return
|
return
|
||||||
} else if len(roomNameEvent.Name) == 0 {
|
} else if len(roomNameEvent.Name) == 0 {
|
||||||
@ -290,7 +291,7 @@ func (handler *CommandHandler) CommandCreate(ce *CommandEvent) {
|
|||||||
|
|
||||||
var encryptionEvent event.EncryptionEventContent
|
var encryptionEvent event.EncryptionEventContent
|
||||||
err = ce.Bot.StateEvent(ce.RoomID, event.StateEncryption, "", &encryptionEvent)
|
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")
|
ce.Reply("Failed to get room encryption status")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user