Add new lookup functions.

This commit is contained in:
2018-12-13 16:01:54 -08:00
parent 0e2cd8c9e9
commit 5627168d20
2 changed files with 16 additions and 3 deletions

View File

@@ -110,8 +110,9 @@ updateSyncResponse model r notify =
<| List.map (userData model.apiUrl
<| Maybe.withDefault "" model.token)
<| newUsers sr
notification sr = List.head
<| List.filter (\(s, e) -> e.sender /= model.loginUsername)
notification sr = findFirstBy
(\(s, e) -> e.originServerTs)
(\(s, e) -> e.sender /= model.loginUsername)
<| notificationEvents sr
notificationCommand sr = Maybe.withDefault Cmd.none
<| Maybe.map (\(s, e) -> sendNotificationPort