~singpolyma/cheogram

ffd9ca70c3d4e886e26c8ed96800f384eeb3caae — Stephen Paul Weber 6 years ago 2aa19dc
Responding to probes instead of broadcasts

I think this is what we're actually supposed to do.
1 files changed, 2 insertions(+), 2 deletions(-)

M Main.hs
M Main.hs => Main.hs +2 -2
@@ 531,8 531,8 @@ componentStanza _ _ toComponent _ (ReceivedPresence (Presence { presenceType = P
		presenceTo = Just from,
		presenceFrom = Just to
	}
componentStanza _ _ toComponent _ (ReceivedPresence (Presence { presenceType = PresenceAvailable, presenceFrom = Just from, presenceTo = Just to@JID { jidNode = Nothing } })) = do
	log "AVAILABLE, SO ARE WE" (from, to)
componentStanza _ _ toComponent _ (ReceivedPresence (Presence { presenceType = PresenceProbe, presenceFrom = Just from, presenceTo = Just to@JID { jidNode = Nothing } })) = do
	log "RESPOND TO PROBES" (from, to)
	writeStanzaChan toComponent $ (emptyPresence PresenceAvailable) {
		presenceTo = Just from,
		presenceFrom = Just to,