@@ 1088,13 1088,10 @@ component db redis backendHost toRoomPresences toRejoinManager toJoinPartDebounc
priority = fromMaybe 0 $ (readZ . textToString . mconcat =<< elementText <$> child (s"{jabber:component:accept}priority") p)
pavailableness = availableness show priority
in do
- -- We already know about this one?
- exists <- fmap (fromMaybe False . hush) $ Redis.runRedis redis $ Redis.hexists (encodeUtf8 $ bareTxt from) (encodeUtf8 $ maybe mempty strResource $ jidResource from)
-- Caps?
- case (exists, XML.attributeText (s"ver") =<< caps, XML.attributeText (s"node") =<< caps) of
- (True, _, _) -> log "IGNOREAVAIL" from
+ case (XML.attributeText (s"ver") =<< caps, XML.attributeText (s"node") =<< caps) of
-- Yes: write ver to <barejid>/resource and <cheoagramjid>/resource
- (_, Just ver, Just node) -> do
+ (Just ver, Just node) -> do
let bver = Base64.decodeLenient $ encodeUtf8 ver
let val = LZ.toStrict $ Builder.toLazyByteString (Builder.word16BE pavailableness ++ Builder.byteString bver)
Right exists <- Redis.runRedis redis $ do