"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "services/brig/test/integration/API/Provider.hs" between
wire-server-2020-06-10.tar.gz and wire-server-2020-06-19.tar.gz

About: Wire (server) offers end-to-end encrypted messaging, file-sharing, video and voice calls, and guest rooms for external communication (back-end server).

Provider.hs  (wire-server-2020-06-10):Provider.hs  (wire-server-2020-06-19)
skipping to change at line 1941 skipping to change at line 1941
let bid = rsAddBotId ars let bid = rsAddBotId ars
let buid = botUserId bid let buid = botUserId bid
let bc = rsAddBotClient ars let bc = rsAddBotClient ars
_ <- svcAssertBotCreated buf bid cid _ <- svcAssertBotCreated buf bid cid
svcAssertMemberJoin buf uid [buid] cid svcAssertMemberJoin buf uid [buid] cid
-- The bot can now fetch the conversation -- The bot can now fetch the conversation
_rs <- getBotConv galley bid cid <!! const 200 === statusCode _rs <- getBotConv galley bid cid <!! const 200 === statusCode
let Just bcnv = responseJsonMaybe _rs let Just bcnv = responseJsonMaybe _rs
liftIO $ do liftIO $ do
assertEqual "id" cid (bcnv ^. Ext.botConvId) assertEqual "id" cid (bcnv ^. Ext.botConvId)
assertEqual "members" [OtherMember uid Nothing roleNameWireAdmin] (bcnv ^. E xt.botConvMembers) assertEqual "members" [OtherMember (makeIdOpaque uid) Nothing roleNameWireAd min] (bcnv ^. Ext.botConvMembers)
-- The user can identify the bot in the member list -- The user can identify the bot in the member list
mems <- fmap cnvMembers . responseJsonError =<< getConversation galley uid cid mems <- fmap cnvMembers . responseJsonError =<< getConversation galley uid cid
let other = listToMaybe (cmOthers mems) let other = listToMaybe (cmOthers mems)
liftIO $ do liftIO $ do
assertEqual "id" (Just buid) (omId <$> other) assertEqual "id" (Just (makeIdOpaque buid)) (omId <$> other)
assertEqual "service" (Just sref) (omService =<< other) assertEqual "service" (Just sref) (omService =<< other)
-- The bot greets the user -- The bot greets the user
WS.bracketR cannon uid $ \ws -> do WS.bracketR cannon uid $ \ws -> do
postBotMessage galley bid bc cid [(uid, uc, "Hi User!")] postBotMessage galley bid bc cid [(uid, uc, "Hi User!")]
!!! const 201 === statusCode !!! const 201 === statusCode
wsAssertMessage ws cid buid bc uc "Hi User!" wsAssertMessage ws cid buid bc uc "Hi User!"
-- The user replies -- The user replies
postMessage galley uid uc cid [(buid, bc, "Hi Bot")] postMessage galley uid uc cid [(buid, bc, "Hi Bot")]
!!! const 201 === statusCode !!! const 201 === statusCode
let msg = OtrMessage uc bc "Hi Bot" (Just "data") let msg = OtrMessage uc bc "Hi Bot" (Just "data")
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)