aboutsummaryrefslogtreecommitdiff
path: root/xmpp/gateway/gateway.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-29 23:59:13 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-29 23:59:13 +0300
commit02578440cd02ceb6716f17acd9a77288bda1a561 (patch)
tree2405de01d64efb93c034a67b29ee0bd00d6b09ca /xmpp/gateway/gateway.go
parent47fa7bca492f9d78c3bea009c7686a6bf4d8fc3b (diff)
Detect the "Have no write access to the chat" error from Telegram
Diffstat (limited to 'xmpp/gateway/gateway.go')
-rw-r--r--xmpp/gateway/gateway.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmpp/gateway/gateway.go b/xmpp/gateway/gateway.go
index 9a42077..09cd42f 100644
--- a/xmpp/gateway/gateway.go
+++ b/xmpp/gateway/gateway.go
@@ -140,6 +140,9 @@ func sendMessageWrapper(to, from, body, subject, id string, component *xmpp.Comp
case 400:
message.Error.Type = stanza.ErrorTypeModify
message.Error.Reason = "bad-request"
+ case 403:
+ message.Error.Type = stanza.ErrorTypeAuth
+ message.Error.Reason = "forbidden"
case 404:
message.Error.Type = stanza.ErrorTypeCancel
message.Error.Reason = "item-not-found"