integration-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Notifications

Synopsis

Documentation

assertNoNotifications Source #

Arguments

:: (HasCallStack, MakesValue user, MakesValue client) 
=> user

the user

-> client

the client of that user

-> Maybe String

the last notif

-> (Value -> App Bool)

the predicate

-> App () 

assert that no notifications with the predicate happen within the timeout

awaitNotifications Source #

Arguments

:: (HasCallStack, MakesValue user, MakesValue client) 
=> user 
-> client 
-> Maybe String 
-> Int

Max no. of notifications

-> (Value -> App Bool)

Selection function. Should not throw any exceptions

-> App [Value] 

awaitNotification :: (HasCallStack, MakesValue user, MakesValue client, MakesValue lastNotifId) => user -> client -> Maybe lastNotifId -> (Value -> App Bool) -> App Value Source #

isConvCreateNotifNotSelf :: MakesValue a => a -> App Bool Source #

like isConvCreateNotif but excludes self conversations

assertLeaveNotification :: (HasCallStack, MakesValue fromUser, MakesValue conv, MakesValue user, MakesValue kickedUser) => fromUser -> conv -> user -> String -> kickedUser -> App () Source #

assertConvUserDeletedNotif :: MakesValue leaverId => WebSocket -> leaverId -> App () Source #