Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Commit

Permalink
add lens for onPresenceChange
Browse files Browse the repository at this point in the history
  • Loading branch information
Philonous committed Sep 17, 2014
1 parent f99bcf0 commit 069b9ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/Network/Xmpp/Lens.hs
Expand Up @@ -94,6 +94,7 @@ module Network.Xmpp.Lens
, sessionStanzaIDsL
, ensableRosterL
, pluginsL
, onPresenceChangeL
-- ** IM
-- *** Roster
-- **** 'Roster'
Expand Down Expand Up @@ -152,6 +153,7 @@ import Network.TLS as TLS
import Network.Xmpp.Concurrent.Types
import Network.Xmpp.IM.Message
import Network.Xmpp.IM.Presence
import Network.Xmpp.IM.PresenceTracker.Types
import Network.Xmpp.IM.Roster.Types
import Network.Xmpp.Types

Expand Down Expand Up @@ -538,6 +540,11 @@ pluginsL :: Lens SessionConfiguration [Plugin]
pluginsL inj sc@SessionConfiguration{plugins = x}
= (\x' -> sc{plugins = x'}) <$> inj x

onPresenceChangeL :: Lens SessionConfiguration (Maybe ( Jid -> PeerStatus
-> PeerStatus -> IO ()))
onPresenceChangeL inj sc@SessionConfiguration{onPresenceChange = x}
= (\x' -> sc{onPresenceChange = x'}) <$> inj x

-- | Access clientServerIdentification inside tlsParams inside streamConfiguration
tlsServerIdentificationL :: Lens SessionConfiguration (String, BS.ByteString)
tlsServerIdentificationL = streamConfigurationL
Expand Down

0 comments on commit 069b9ef

Please sign in to comment.