mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Remove unused matcher
This commit is contained in:
parent
53c4c78442
commit
3d305f6988
@ -141,19 +141,6 @@ func MatchRoomTimeline(events []json.RawMessage) RoomMatcher {
|
||||
}
|
||||
}
|
||||
|
||||
// MatchRoomHasEventID builds a matcher which asserts that the room timeline part of
|
||||
// a sync response contains a specific event ID.
|
||||
func MatchRoomHasEventID(eventID string) RoomMatcher {
|
||||
return func(r sync3.Room) error {
|
||||
for _, event := range r.Timeline {
|
||||
if gjson.ParseBytes(event).Get("event_id").Str == eventID {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("Event %s did not appear in timeline")
|
||||
}
|
||||
}
|
||||
|
||||
func MatchRoomHighlightCount(count int64) RoomMatcher {
|
||||
return func(r sync3.Room) error {
|
||||
if r.HighlightCount != count {
|
||||
|
Loading…
x
Reference in New Issue
Block a user