From 41503c7fd4e94e85a9d47f64fd8b2582cb085b37 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Thu, 28 Sep 2023 16:30:28 -0400 Subject: [PATCH] Return registration-required instead of not-authorized --- xmpp/handlers.go | 6 +++--- 1 file 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"