-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't require end
on /messages
#1265
Conversation
I think the spec's wording is actually stricter here: I think it's saying that Should we be asserting that |
Makes sense, yea. |
I thought that recently got fixed in synapse. |
|
Hm, what happens if the returned If so, we probably can't assert that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm otherwise
tests/10apidoc/34room-messages.pl
Outdated
|
||
scalar @{ $body->{chunk} } > 0 or | ||
die "Expected some messages but got none at all\n"; | ||
})->then( sub { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/10apidoc/34room-messages.pl
Outdated
|
||
# With no params this does "forwards from END"; i.e. nothing useful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs repeating here
# With no params this does "forwards from END"; i.e. nothing useful |
tests/10apidoc/34room-messages.pl
Outdated
|
||
scalar @{ $body->{chunk} } > 0 or | ||
die "Expected some messages but got none at all\n"; | ||
})->then( sub { | ||
|
||
# Do another call to /messages, this time we don't expect to receive a "end" key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Do another call to /messages, this time we don't expect to receive a "end" key | |
# Do another call to /messages. This time we don't expect to receive a "end" key |
tests/10apidoc/34room-messages.pl
Outdated
@@ -158,12 +158,33 @@ sub matrix_send_room_text_message | |||
})->then( sub { | |||
my ( $body ) = @_; | |||
|
|||
# We should still get events and a "end" key, check it is actually there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# We should still get events and a "end" key, check it is actually there | |
# We should still get events and a "end" key: check they are actually there |
tests/10apidoc/34room-messages.pl
Outdated
@@ -197,10 +219,12 @@ sub matrix_send_room_text_message | |||
my ( $body ) = @_; | |||
|
|||
log_if_fail "Body", $body; | |||
|
|||
|
|||
# We should still get events and a "end" key, check it is actually there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# We should still get events and a "end" key, check it is actually there | |
# We should still get events and a "end" key: check they are actually there |
tests/10apidoc/34room-messages.pl
Outdated
@@ -209,6 +233,25 @@ sub matrix_send_room_text_message | |||
scalar @{ $body->{chunk} } > 0 or | |||
die "Expected some messages but got none at all\n"; | |||
|
|||
})->then( sub { | |||
# Do another call to /messages, this time we don't expect to receive a "end" key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Do another call to /messages, this time we don't expect to receive a "end" key | |
# Do another call to /messages. This time we don't expect to receive a "end" key |
tests/10apidoc/34room-messages.pl
Outdated
|
||
# With no params this does "forwards from END"; i.e. nothing useful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# With no params this does "forwards from END"; i.e. nothing useful |
As per the spec, the
end
key is not required if there are no more events for the user.