~singpolyma/cheogram

6f42ab1c919984477323b9172d3822ada15d3d1c — Stephen Paul Weber 8 years ago 4862e01
Show participants on join
1 files changed, 2 insertions(+), 0 deletions(-)

M Main.hs
M Main.hs => Main.hs +2 -0
@@ 260,6 260,8 @@ componentStanza db toVitelity toComponent _ (ReceivedPresence p@(Presence { pres
				}
			_ -> do
				writeStanzaChan toVitelity $ mkSMS tel (mconcat [fromString "* You have joined ", bareMUC, fromString " as ", roomNick])
				presence <- fmap (fromMaybe [] . (readZ =<<)) (TC.runTCM $ TC.get db (T.unpack bareMUC <> "\0presence"))
				writeStanzaChan toVitelity $ mkSMS tel $ fromString $ "Group participants: " <> intercalate ", " presence
				queryDisco toComponent room to
	where
	Just room = parseJID bareMUC