~singpolyma/cheogram

71aecc72458ca69bf56c00ae3bf64400469dcbb6 — Stephen Paul Weber 8 years ago 971d8cb
Bookmark every room we join
1 files changed, 2 insertions(+), 0 deletions(-)

M Main.hs
M Main.hs => Main.hs +2 -0
@@ 239,6 239,8 @@ componentStanza db toVitelity toComponent _ (ReceivedPresence p@(Presence { pres
			True <- TC.runTCM $ TC.out db $ tcKey tel "invited"
			return ()
		tcPutJID db tel "joined" from
		bookmarks <- fmap (fromMaybe [] . (readZ =<<)) (TC.runTCM $ TC.get db (tcKey tel "bookmarks"))
		True <- TC.runTCM (TC.put db (tcKey tel "bookmarks") (show $ sort $ nub $ (T.unpack bareMUC):bookmarks))

		creating <- tcGetJID db tel "creating"
		void $ TC.runTCM $ TC.out db $ tcKey tel "creating"