Fix spec misconception
Apparently, the field is also meant for other reasons than the cputime unlimited filesize unlimited datasize unlimited stacksize 8MB coredumpsize unlimited resident unlimited maxproc 62741 descriptors 524288 memorylocked 8MB addressspace unlimited maxfilelocks unlimited sigpending 62741 msgqueue 819200 nice 0 rt_priority 0 rt_time unlimited field on the filter, despite the description suggesting otherwise.pull/31/head
parent
1aecb1116a
commit
39f8021a8f
|
@ -104,9 +104,9 @@ syncV1 data =
|
||||||
, coder = V1.coderSyncResponse
|
, coder = V1.coderSyncResponse
|
||||||
, contextChange = always identity
|
, contextChange = always identity
|
||||||
, method = "GET"
|
, method = "GET"
|
||||||
, path = [ "_matrix", "client", "r0", "sync" ]
|
, path = [ "_matrix", "client", "v3", "sync" ]
|
||||||
, toUpdate =
|
, toUpdate =
|
||||||
V1.updateSyncResponse { filter = Filter.pass, since = data.since }
|
Debug.log "Handling output v1" >> V1.updateSyncResponse { filter = Filter.pass, since = data.since } >> Debug.log "Received"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,9 +126,9 @@ syncV2 data =
|
||||||
, coder = V2.coderSyncResponse
|
, coder = V2.coderSyncResponse
|
||||||
, contextChange = always identity
|
, contextChange = always identity
|
||||||
, method = "GET"
|
, method = "GET"
|
||||||
, path = [ "_matrix", "client", "r0", "sync" ]
|
, path = [ "_matrix", "client", "v3", "sync" ]
|
||||||
, toUpdate =
|
, toUpdate =
|
||||||
V2.updateSyncResponse { filter = Filter.pass, since = data.since }
|
Debug.log "Handling output v2" >> V2.updateSyncResponse { filter = Filter.pass, since = data.since } >> Debug.log "Received"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,9 +148,9 @@ syncV3 data =
|
||||||
, coder = V3.coderSyncResponse
|
, coder = V3.coderSyncResponse
|
||||||
, contextChange = always identity
|
, contextChange = always identity
|
||||||
, method = "GET"
|
, method = "GET"
|
||||||
, path = [ "_matrix", "client", "r0", "sync" ]
|
, path = [ "_matrix", "client", "v3", "sync" ]
|
||||||
, toUpdate =
|
, toUpdate =
|
||||||
V3.updateSyncResponse { filter = Filter.pass, since = data.since }
|
Debug.log "Handling output v3" >> V3.updateSyncResponse { filter = Filter.pass, since = data.since } >> Debug.log "Received"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ syncV4 data =
|
||||||
, coder = V4.coderSyncResponse
|
, coder = V4.coderSyncResponse
|
||||||
, contextChange = always identity
|
, contextChange = always identity
|
||||||
, method = "GET"
|
, method = "GET"
|
||||||
, path = [ "_matrix", "client", "r0", "sync" ]
|
, path = [ "_matrix", "client", "v3", "sync" ]
|
||||||
, toUpdate =
|
, toUpdate =
|
||||||
V4.updateSyncResponse { filter = Filter.pass, since = data.since }
|
Debug.log "Handling output v4" >> V4.updateSyncResponse { filter = Filter.pass, since = data.since } >> Debug.log "Received"
|
||||||
}
|
}
|
||||||
|
|
|
@ -935,18 +935,56 @@ updateTimeline { filter, nextBatch, roomId, since } timeline =
|
||||||
timeline.events
|
timeline.events
|
||||||
|> Maybe.map
|
|> Maybe.map
|
||||||
(\events ->
|
(\events ->
|
||||||
R.AddSync
|
let
|
||||||
{ events = List.map (toEvent roomId) events
|
limited : Bool
|
||||||
, filter = filter
|
limited =
|
||||||
, start =
|
Maybe.withDefault False timeline.limited
|
||||||
case timeline.prevBatch of
|
|
||||||
Just _ ->
|
|
||||||
timeline.prevBatch
|
|
||||||
|
|
||||||
Nothing ->
|
newEvents : List Event.Event
|
||||||
since
|
newEvents =
|
||||||
, end = nextBatch
|
List.map (toEvent roomId) events
|
||||||
}
|
in
|
||||||
|
case ( limited, timeline.prevBatch ) of
|
||||||
|
( False, Just p ) ->
|
||||||
|
if timeline.prevBatch == since then
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = Just p
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
R.More
|
||||||
|
[ R.AddSync
|
||||||
|
{ events = []
|
||||||
|
, filter = filter
|
||||||
|
, start = since
|
||||||
|
, end = p
|
||||||
|
}
|
||||||
|
, R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = Just p
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
( False, Nothing ) ->
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = since
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
( True, _ ) ->
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = timeline.prevBatch
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -683,18 +683,56 @@ updateJoinedRoom data room =
|
||||||
|
|
||||||
updateTimeline : { filter : Filter, nextBatch : String, roomId : String, since : Maybe String } -> Timeline -> R.RoomUpdate
|
updateTimeline : { filter : Filter, nextBatch : String, roomId : String, since : Maybe String } -> Timeline -> R.RoomUpdate
|
||||||
updateTimeline { filter, nextBatch, roomId, since } timeline =
|
updateTimeline { filter, nextBatch, roomId, since } timeline =
|
||||||
R.AddSync
|
let
|
||||||
{ events = List.map (toEvent roomId) timeline.events
|
limited : Bool
|
||||||
, filter = filter
|
limited =
|
||||||
, start =
|
Maybe.withDefault False timeline.limited
|
||||||
case timeline.prevBatch of
|
|
||||||
Just _ ->
|
|
||||||
timeline.prevBatch
|
|
||||||
|
|
||||||
Nothing ->
|
newEvents : List Event.Event
|
||||||
since
|
newEvents =
|
||||||
, end = nextBatch
|
List.map (toEvent roomId) timeline.events
|
||||||
}
|
in
|
||||||
|
case ( limited, timeline.prevBatch ) of
|
||||||
|
( False, Just p ) ->
|
||||||
|
if timeline.prevBatch == since then
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = Just p
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
R.More
|
||||||
|
[ R.AddSync
|
||||||
|
{ events = []
|
||||||
|
, filter = filter
|
||||||
|
, start = since
|
||||||
|
, end = p
|
||||||
|
}
|
||||||
|
, R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = Just p
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
( False, Nothing ) ->
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = since
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
( True, _ ) ->
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = timeline.prevBatch
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
toEvent : String -> ClientEventWithoutRoomID -> Event.Event
|
toEvent : String -> ClientEventWithoutRoomID -> Event.Event
|
||||||
|
|
|
@ -952,18 +952,56 @@ updateJoinedRoom data room =
|
||||||
|
|
||||||
updateTimeline : { filter : Filter, nextBatch : String, roomId : String, since : Maybe String } -> Timeline -> R.RoomUpdate
|
updateTimeline : { filter : Filter, nextBatch : String, roomId : String, since : Maybe String } -> Timeline -> R.RoomUpdate
|
||||||
updateTimeline { filter, nextBatch, roomId, since } timeline =
|
updateTimeline { filter, nextBatch, roomId, since } timeline =
|
||||||
R.AddSync
|
let
|
||||||
{ events = List.map (toEvent roomId) timeline.events
|
limited : Bool
|
||||||
, filter = filter
|
limited =
|
||||||
, start =
|
Maybe.withDefault False timeline.limited
|
||||||
case timeline.prevBatch of
|
|
||||||
Just _ ->
|
|
||||||
timeline.prevBatch
|
|
||||||
|
|
||||||
Nothing ->
|
newEvents : List Event.Event
|
||||||
since
|
newEvents =
|
||||||
, end = nextBatch
|
List.map (toEvent roomId) timeline.events
|
||||||
}
|
in
|
||||||
|
case ( limited, timeline.prevBatch ) of
|
||||||
|
( False, Just p ) ->
|
||||||
|
if timeline.prevBatch == since then
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = Just p
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
R.More
|
||||||
|
[ R.AddSync
|
||||||
|
{ events = []
|
||||||
|
, filter = filter
|
||||||
|
, start = since
|
||||||
|
, end = p
|
||||||
|
}
|
||||||
|
, R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = Just p
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
( False, Nothing ) ->
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = since
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
( True, _ ) ->
|
||||||
|
R.AddSync
|
||||||
|
{ events = newEvents
|
||||||
|
, filter = filter
|
||||||
|
, start = timeline.prevBatch
|
||||||
|
, end = nextBatch
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
toEvent : String -> ClientEventWithoutRoomID -> Event.Event
|
toEvent : String -> ClientEventWithoutRoomID -> Event.Event
|
||||||
|
|
Loading…
Reference in New Issue