Add missing changes from previous commit

This commit is contained in:
Danila Fedorin 2019-09-12 16:00:23 -07:00
parent c594d9858f
commit 105f7e6012

View File

@ -114,7 +114,7 @@ requestScrollCmd = Task.attempt ViewportAfterMessage (Browser.Dom.getViewportOf
newUsersCmd : Model -> List Username -> Cmd Msg newUsersCmd : Model -> List Username -> Cmd Msg
newUsersCmd m us = m.token newUsersCmd m us = m.token
|> Maybe.map (\t -> List.map (userData m.apiUrl t) us) |> Maybe.map (\t -> List.map (getUserData m.apiUrl t) us)
|> Maybe.withDefault [] |> Maybe.withDefault []
|> Cmd.batch |> Cmd.batch
@ -317,12 +317,12 @@ updateSyncResponse model r notify =
notification sr = findFirstBy notification sr = findFirstBy
(\(s, e) -> e.originServerTs) (\(s, e) -> e.originServerTs)
(\(s, e) -> e.sender /= model.loginUsername) (\(s, e) -> e.sender /= model.loginUsername)
<| joinedRoomNotificationEvents sr <| getNotificationEvents sr
notificationCmd sr = if notify notificationCmd sr = if notify
then Maybe.withDefault Cmd.none then Maybe.withDefault Cmd.none
<| Maybe.map (\(s, e) -> sendNotificationPort <| Maybe.map (\(s, e) -> sendNotificationPort
{ name = getDisplayName model.userData e.sender { name = getDisplayName model.userData e.sender
, text = notificationText e , text = getText e
, room = s , room = s
}) <| notification sr }) <| notification sr
else Cmd.none else Cmd.none