Browse Source

changed JID field names to conform to RFC 6120

master
Philipp Balzarek 14 years ago
parent
commit
ef63f12952
  1. 6
      src/Network/XMPP/Types.hs
  2. 6
      src/Tests.hs

6
src/Network/XMPP/Types.hs

@ -73,11 +73,11 @@ instance IsString StanzaId where @@ -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
}

6
src/Tests.hs

@ -89,11 +89,11 @@ runMain debug number = do @@ -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 @@ -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

Loading…
Cancel
Save