~singpolyma/cheogram

9ea598cde43318fd6464b48310cf450a008879ae — Stephen Paul Weber 6 years ago f05cdb0
Do not ping MUC participants who are not ours

We can't rejoin them anyway
1 files changed, 6 insertions(+), 1 deletions(-)

M Main.hs
M Main.hs => Main.hs +6 -1
@@ 1435,7 1435,12 @@ rejoinManager db sendToComponent componentJid toRoomPresences toRejoinManager =
	next mempty
	where
	mkMucJid muc nick = parseJID $ bareTxt muc <> fromString "/" <> nick
	ourJids muc (x,y) = (,) <$> mkMucJid muc x <*> (parseJID =<< y)
	ourJids muc (x,y)
		| Just (JID { jidDomain = d }) <- yJid,
		  strDomain d /= fromString componentJid = Nothing
		| otherwise = (,) <$> mkMucJid muc x <*> yJid
		where
		yJid = parseJID =<< y

	next state = atomically (readTChan toRejoinManager) >>= go state