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"