From ef63f12952bd3369f5f1fb7df8d2a172b9ff426f Mon Sep 17 00:00:00 2001 From: Philipp Balzarek Date: Mon, 16 Apr 2012 17:15:04 +0200 Subject: [PATCH] changed JID field names to conform to RFC 6120 --- src/Network/XMPP/Types.hs | 6 +++--- src/Tests.hs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Network/XMPP/Types.hs b/src/Network/XMPP/Types.hs index e948756..550c189 100644 --- a/src/Network/XMPP/Types.hs +++ b/src/Network/XMPP/Types.hs @@ -73,11 +73,11 @@ instance IsString StanzaId where -- @From@ is a readability type synonym for @Address@. -- | Jabber ID (JID) datatype -data JID = JID { node :: Maybe Text +data JID = JID { localpart :: Maybe Text -- ^ Account name - , domain :: Text + , domainpart :: Text -- ^ Server adress - , resource :: Maybe Text + , resourcepart :: Maybe Text -- ^ Resource name } diff --git a/src/Tests.hs b/src/Tests.hs index e3438f3..2e99ea2 100644 --- a/src/Tests.hs +++ b/src/Tests.hs @@ -89,11 +89,11 @@ runMain debug number = do withConnection $ do xmppConnect "localhost" "species64739.dyndns.org" xmppStartTLS exampleParams - saslResponse <- xmppSASL (fromJust $ node we) "pwd" + saslResponse <- xmppSASL (fromJust $ localpart we) "pwd" case saslResponse of Right _ -> return () Left e -> error e - xmppThreadedBind (resource we) + xmppThreadedBind (resourcepart we) withConnection $ xmppSession debug' "session standing" sendPresence presenceOnline @@ -101,7 +101,7 @@ runMain debug number = do forkXMPP iqResponder when active . void . forkXMPP $ do forM [1..10] $ \count -> do - let message = Text.pack . show $ node we + let message = Text.pack . show $ localpart we let payload = Payload count (even count) (Text.pack $ show count) let body = pickleElem payloadP payload Right answer <- sendIQ' (Just them) Get Nothing body