diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-09-28 23:30:28 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-09-28 23:30:28 +0300 |
commit | 41503c7fd4e94e85a9d47f64fd8b2582cb085b37 (patch) | |
tree | 4dd03d23292294937a5f44dc83a6a4e56655c868 /xmpp | |
parent | cdaaa75c960c949a81114824b7f7b516d962ec68 (diff) |
Return registration-required instead of not-authorized
Diffstat (limited to 'xmpp')
-rw-r--r-- | xmpp/handlers.go | 6 |
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" |