diff --git a/Urbit/Airlock.hs b/Urbit/Airlock.hs index 81bef40..ec14e8d 100644 --- a/Urbit/Airlock.hs +++ b/Urbit/Airlock.hs @@ -86,14 +86,15 @@ poke sess ship shipName app mark json = sess (channelUrl ship) $ Aeson.toJSON $ - Aeson.object - [ "id" .= nextEventId ship, - "action" .= Text.pack "poke", - "ship" .= shipName, - "app" .= app, - "mark" .= mark, - "json" .= json - ] + [ Aeson.object + [ "id" .= nextEventId ship, + "action" .= Text.pack "poke", + "ship" .= shipName, + "app" .= app, + "mark" .= mark, + "json" .= json + ] + ] -- | Acknowledge receipt of a message. (This clears it from the ship's queue.) ack :: Session.Session -> Ship -> Int -> IO (Wreq.Response L.ByteString) @@ -102,10 +103,11 @@ ack sess ship eventId = sess (channelUrl ship) $ Aeson.toJSON $ - Aeson.object - [ "action" .= Text.pack "ack", - "event-id" .= eventId - ] + [ Aeson.object + [ "action" .= Text.pack "ack", + "event-id" .= eventId + ] + ] -- | subscribe :: Ship -> Path -> OutputStream ByteString -> IO () diff --git a/test.hs b/test.hs index cd6ee4e..eda8dc2 100644 --- a/test.hs +++ b/test.hs @@ -46,7 +46,7 @@ main = do "number" .= (1 :: Int), -- FIXME: should this be lastEventId? "author" .= Text.pack "~zod", "when" .= (1602118786225 :: Int), - "letter" .= Aeson.object ["text" .= Text.pack "hello world!"] + "letter" .= Aeson.object ["text" .= Text.pack "hello world from haskell!"] ] ] ]