~singpolyma/cheogram-muc-bridge

a7dfe72ff378acbfc6522726f513cf1eda6df5c1 — Stephen Paul Weber 3 months ago 06e4b25
Fix <<loop>> caused by accidental name shadowing
1 files changed, 5 insertions(+), 5 deletions(-)

M Session.hs
M Session.hs => Session.hs +5 -5
@@ 21,13 21,13 @@ cleanOld config source = do
	forM_ old $ \(muc, nick, source_nick, count) ->
		let
			Just target = XMPP.parseJID $ muc  ++ s"/" ++ nick
			Just source = XMPP.parseJID $ bareTxt source ++ s"/" ++ source_nick
			Just source' = XMPP.parseJID $ bareTxt source ++ s"/" ++ source_nick
		in
		if count > (1::Int) then
			mkSession config XMPP.PresenceUnavailable (Just source) target
		else
		if count > (1::Int) then do
			mkSession config XMPP.PresenceUnavailable (Just source') target
		else do
			sendPresence config ((XMPP.emptyPresence XMPP.PresenceUnavailable) {
				XMPP.presenceFrom = Just source
				XMPP.presenceFrom = Just source'
			}) target

mkSession :: (MonadIO m) =>