hzulip 0.3.0.1 → 0.3.0.2
raw patch · 3 files changed
+13/−2 lines, 3 files
Files
- hzulip.cabal +1/−1
- src/HZulip.hs +11/−0
- src/HZulip/Types.hs +1/−1
hzulip.cabal view
@@ -1,5 +1,5 @@ name: hzulip-version: 0.3.0.1+version: 0.3.0.2 synopsis: A haskell wrapper for the Zulip API. description: This a Zulip API wrapper for Haskell. homepage: https://github.com/yamadapc/hzulip
src/HZulip.hs view
@@ -105,6 +105,17 @@ else fail $ responseMsg body -- |+-- Get a list of the streams the client is currently subscribed to.+getSubscriptions :: ZulipClient -> IO [String]+getSubscriptions z = do+ r <- getWith opts (subscriptionsUrl z) >>= asJSON+ let body = r ^. responseBody++ if wasSuccessful body+ then let Just subscriptions = responseSubscriptions in+ return subscriptions++-- | -- Fetches new set of events from a `Queue`. getEvents :: ZulipClient -> Queue -> Bool -> IO (Queue, [Event]) getEvents z q b = do
src/HZulip/Types.hs view
@@ -99,8 +99,8 @@ (User <$> o .: "sender_id" <*> o .: "sender_full_name" <*>- o .: "sender_domain" <*> o .: "sender_email" <*>+ o .: "sender_domain" <*> o .: "sender_short_name" ) <*>