diff --git a/source/Network/Xmpp/IM/PresenceTracker/Types.hs b/source/Network/Xmpp/IM/PresenceTracker/Types.hs new file mode 100644 index 0000000..4dc412c --- /dev/null +++ b/source/Network/Xmpp/IM/PresenceTracker/Types.hs @@ -0,0 +1,16 @@ +module Network.Xmpp.IM.PresenceTracker.Types where + +import Data.Map (Map) + +import Network.Xmpp.Types +import Network.Xmpp.IM.Presence + +-- Map from bare JIDs to a map of full JIDs to show maybe status. +-- +-- Invariants: +-- * The outer map should not have entries for bare JIDs that have no +-- available resource, i.e. the inner map should never be empty +-- +-- * The inner map keys' local and domain part coincide with the outer keys' +newtype Peers = Peers { unPeers :: Map Jid (Map Jid (Maybe IMPresence))} + deriving (Show)