From 8aaab5785893c5db0338952345894d58c5e5a771 Mon Sep 17 00:00:00 2001 From: John Millikin Date: Mon, 26 Apr 2010 04:13:48 +0000 Subject: [PATCH] When authenticating, do not include resources in the JID. --- Network/Protocol/XMPP/Client/Authentication.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Network/Protocol/XMPP/Client/Authentication.hs b/Network/Protocol/XMPP/Client/Authentication.hs index 7b359f4..791efa4 100644 --- a/Network/Protocol/XMPP/Client/Authentication.hs +++ b/Network/Protocol/XMPP/Client/Authentication.hs @@ -35,7 +35,7 @@ import Text.XML.HXT.DOM.Interface (XmlTree) import qualified Network.Protocol.SASL.GNU as SASL import qualified Network.Protocol.XMPP.Monad as M -import Network.Protocol.XMPP.JID (JID, formatJID) +import Network.Protocol.XMPP.JID (JID, formatJID, jidResource) import Network.Protocol.XMPP.XML (element, qname) data Result = Success | Failure @@ -54,7 +54,7 @@ authenticate :: [B.ByteString] -- ^ Mechanisms -> M.XMPP () authenticate xmppMechanisms userJID serverJID username password = xmpp where mechanisms = map SASL.Mechanism xmppMechanisms - authz = formatJID userJID + authz = formatJID $ userJID { jidResource = Nothing } hostname = formatJID serverJID utf8 = TE.encodeUtf8 -- 2.45.2