aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-28 23:30:28 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-28 23:30:28 +0300
commit41503c7fd4e94e85a9d47f64fd8b2582cb085b37 (patch)
tree4dd03d23292294937a5f44dc83a6a4e56655c868
parentcdaaa75c960c949a81114824b7f7b516d962ec68 (diff)
Return registration-required instead of not-authorized
-rw-r--r--xmpp/handlers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go
index ff8fb21..cfa6226 100644
--- a/xmpp/handlers.go
+++ b/xmpp/handlers.go
@@ -448,7 +448,7 @@ func handleMUCPresence(s xmpp.Sender, p stanza.Presence, mucExt stanza.MucPresen
session, ok := sessions[fromBare]
if !ok || !session.Session.MUC {
- presenceReplySetError(reply, 401)
+ presenceReplySetError(reply, 407)
return
}
@@ -790,9 +790,9 @@ func presenceReplySetError(reply *stanza.Presence, code int) {
case 400:
reply.Error.Type = stanza.ErrorTypeModify
reply.Error.Reason = "jid-malformed"
- case 401:
+ case 407:
reply.Error.Type = stanza.ErrorTypeAuth
- reply.Error.Reason = "not-authorized"
+ reply.Error.Reason = "registration-required"
case 404:
reply.Error.Type = stanza.ErrorTypeCancel
reply.Error.Reason = "item-not-found"