~singpolyma/cheogram-muc-bridge

c36848112fcaa4ee83e34f4484dca45e39798e1e — Stephen Paul Weber 11 months ago 1a6f406
hlint clean
2 files changed, 2 insertions(+), 2 deletions(-)

M Session.hs
M gateway.hs
M Session.hs => Session.hs +1 -1
@@ 96,7 96,7 @@ sendPresenceToMUC config presence@XMPP.Presence {
	where
	nickReplacement = maybe id replaceNotInClass (Config.nickChars targetMuc)
	target = maybeAddNick (Config.jid targetMuc) $ nickReplacement $
		(maybeTruncate nickLength fromNick) ++ subscript
		maybeTruncate nickLength fromNick ++ subscript
	subscript = s"[" ++ tag ++ s"]"
	nickLength = fmap (subtract 2 . subtract (T.length tag) . fromIntegral) $
		Config.nickLength targetMuc

M gateway.hs => gateway.hs +1 -1
@@ 58,7 58,7 @@ handlePresence config presence@XMPP.Presence {
			)
	| typ == XMPP.PresenceUnavailable,
	  hasMucCode 110 presence, -- done leaving room
	  Just source <- (XMPP.parseJID . unescapeJid . XMPP.strNode) =<< XMPP.jidNode to = do
	  Just source <- (XMPP.parseJID . unescapeJid . XMPP.strNode) =<< XMPP.jidNode to =
		Session.mkSession config typ (Just source) from
	| bareTxt to /= bareTxt (Config.bridgeJid config) =
		-- This is to one of our ghosts, so just ignore it