{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/sytest/pulls/comments/41667173","id":41667173,"diff_hunk":"@@ -44,10 +44,17 @@ sub matrix_send_room_message\n \n    my $type = $opts{type} // \"m.room.message\";\n \n-   do_request_json_for( $user,\n-      method => \"POST\",\n-      uri    => \"/api/v1/rooms/$room_id/send/$type\",\n+   my $method = \"POST\";\n+   my $uri = \"/api/v1/rooms/$room_id/send/$type\";\n+\n+   if (defined $opts{txn_id}) {\n+      $method = \"PUT\";\n+      $uri = \"$uri/${\\ $opts{txn_id} }\";","path":"tests/10apidoc/34room-messages.pl","position":null,"original_position":12,"commit_id":"d8a1e75a24ef0bbb74b92b77502ee92fbc2ba976","original_commit_id":"93bbbe472c30108e8c40252f64c60b009719fbc4","user":{"login":"NegativeMjark","id":904009,"avatar_url":"https://avatars.githubusercontent.com/u/904009?v=3","gravatar_id":"","url":"https://api.github.com/users/NegativeMjark","html_url":"https://github.com/NegativeMjark","followers_url":"https://api.github.com/users/NegativeMjark/followers","following_url":"https://api.github.com/users/NegativeMjark/following{/other_user}","gists_url":"https://api.github.com/users/NegativeMjark/gists{/gist_id}","starred_url":"https://api.github.com/users/NegativeMjark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NegativeMjark/subscriptions","organizations_url":"https://api.github.com/users/NegativeMjark/orgs","repos_url":"https://api.github.com/users/NegativeMjark/repos","events_url":"https://api.github.com/users/NegativeMjark/events{/privacy}","received_events_url":"https://api.github.com/users/NegativeMjark/received_events","type":"User","site_admin":false},"body":"Done d8a1e75","created_at":"2015-10-09T19:10:54Z","updated_at":"2015-10-09T19:10:54Z","html_url":"https://github.com/matrix-org/sytest/pull/20#discussion_r41667173","pull_request_url":"https://api.github.com/repos/matrix-org/sytest/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/sytest/pulls/comments/41667173"},"html":{"href":"https://github.com/matrix-org/sytest/pull/20#discussion_r41667173"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/sytest/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/matrix-org/sytest/pulls/20","id":47151562,"html_url":"https://github.com/matrix-org/sytest/pull/20","diff_url":"https://github.com/matrix-org/sytest/pull/20.diff","patch_url":"https://github.com/matrix-org/sytest/pull/20.patch","issue_url":"https://api.github.com/repos/matrix-org/sytest/issues/20","number":20,"state":"open","locked":false,"title":"Tests for the v2 sync API","user":{"login":"NegativeMjark","id":904009,"avatar_url":"https://avatars.githubusercontent.com/u/904009?v=3","gravatar_id":"","url":"https://api.github.com/users/NegativeMjark","html_url":"https://github.com/NegativeMjark","followers_url":"https://api.github.com/users/NegativeMjark/followers","following_url":"https://api.github.com/users/NegativeMjark/following{/other_user}","gists_url":"https://api.github.com/users/NegativeMjark/gists{/gist_id}","starred_url":"https://api.github.com/users/NegativeMjark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NegativeMjark/subscriptions","organizations_url":"https://api.github.com/users/NegativeMjark/orgs","repos_url":"https://api.github.com/users/NegativeMjark/repos","events_url":"https://api.github.com/users/NegativeMjark/events{/privacy}","received_events_url":"https://api.github.com/users/NegativeMjark/received_events","type":"User","site_admin":false},"body":"We need to test the following:\r\n\r\n* [x] That we can sync a joined room.\r\n * [x] That we can sync a room joined before syncing. 7aa0e8f\r\n * [x] That we can sync incremental changes to a room. 5ab8118\r\n * [x] That when we join a room it is included in the next incremental sync. 93bbbe4\r\n\r\n* [ ] That presence is included in an initial sync.\r\n * [ ] That updates to presence is included in an incremental sync.\r\n * [x] That the user is considered to be online in their own sync if they haven't set a set_presence. 97b12eb\r\n * [x] That the user is considered to be offline in their own sync if they have set a set_presence=offline. 97b12eb\r\n\r\n* [ ] That the timeline limits are applied correctly when syncing a room\r\n  * [x] That setting the limit to one returns only one event and is limited. cffee9b\r\n  * [ ] That setting the limit to a large number on a new room isn't limited.\r\n  * [ ] That setting the limit on a filtered timeline works.\r\n  * [ ] That the prev_batch token can be used in the v1 messages API to retrieve messages that were cut off by the limit. \r\n\r\n* [ ] That state is included in an initial sync.\r\n * [ ] That the state of the room is included in the initial sync.\r\n * [ ] That the delta to the state is included in the incremental sync.\r\n\r\n* [ ] That messages sent by the user appear in their timeline.\r\n  * [x] That a message sent before an initial sync appears in the timeline. cffee9b\r\n  * [x] That a message sent after an initial sync appears in the timeline of an incremental sync. 5ab8118\r\n  * [x] That a message sent before an initial sync with a transaction id appears in the timeline. 242f0de\r\n  * [ ] That the prev_batch token can be used in the v1 messages API to retrieve messages that were cut off by the limit. \r\n\r\n* [ ] That filters work.\r\n  * [ ] That presence filters work.\r\n  * [ ] That room state filters work.\r\n  * [ ] That room timeline filters work.\r\n  * [ ] That room ephemeral filters work.\r\n\r\n* [ ] That read receipts are included in the ephemeral events.\r\n  * [ ] That read receipts are included in the initial sync.\r\n  * [ ] That read receipts are included in the incremental sync.\r\n  * [ ] That read receipts behave correctly when timeline events are filtered.\r\n\r\n* [ ] That typing notifications are included in the ephemeral events.\r\n * [ ] That typing notifications are included in the initial sync.\r\n * [ ] That typing notifications are included in the incremental sync.\r\n\r\n* [ ] That rooms that the user is invited to are included in the sync.\r\n * [ ] That invited rooms appear in the initial sync.\r\n * [ ] That new invited rooms appear in an incremental sync.\r\n * [ ] That when joining a room that the user was invited to the user receives the complete state for the room in the next incremental sync.\r\n\r\n* [ ] That rooms that the user has left or been banned from appear in the sync.\r\n * [ ] That rooms that the user has left appear in an initial sync.\r\n * [ ] That rooms that the user has been banned from appear in the initial sync.\r\n * [ ] That rooms that the user has newly left appear in the incremental sync.\r\n * [ ] That rooms that the user has been newly banned from appear in the incremental sync.\r\n\r\n* [ ] That the sync API can be polled for updates using the timeout parameter.\r\n * [ ] That the sync API is woken up by new message events.\r\n * [ ] That the sync API is woken up by presence events.\r\n * [ ] That the sync API is woken up by read receipt events.\r\n * [ ] That the sync API is woken up by typing events.\r\n * [ ] That the sync API isn't woken up for an event excluded by the filter.","created_at":"2015-10-08T13:23:14Z","updated_at":"2015-10-09T19:10:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8806ebd634a584efd46cfb0984317c026e4e4fb1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/sytest/pulls/20/commits","review_comments_url":"https://api.github.com/repos/matrix-org/sytest/pulls/20/comments","review_comment_url":"https://api.github.com/repos/matrix-org/sytest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/sytest/issues/20/comments","statuses_url":"https://api.github.com/repos/matrix-org/sytest/statuses/d8a1e75a24ef0bbb74b92b77502ee92fbc2ba976","head":{"label":"matrix-org:markjh/v2_sync_api","ref":"markjh/v2_sync_api","sha":"d8a1e75a24ef0bbb74b92b77502ee92fbc2ba976","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":23436169,"name":"sytest","full_name":"matrix-org/sytest","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/sytest","description":"Black-box integration testing for Matrix homeservers","fork":false,"url":"https://api.github.com/repos/matrix-org/sytest","forks_url":"https://api.github.com/repos/matrix-org/sytest/forks","keys_url":"https://api.github.com/repos/matrix-org/sytest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/sytest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/sytest/teams","hooks_url":"https://api.github.com/repos/matrix-org/sytest/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/sytest/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/sytest/events","assignees_url":"https://api.github.com/repos/matrix-org/sytest/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/sytest/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/sytest/tags","blobs_url":"https://api.github.com/repos/matrix-org/sytest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/sytest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/sytest/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/sytest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/sytest/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/sytest/languages","stargazers_url":"https://api.github.com/repos/matrix-org/sytest/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/sytest/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/sytest/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/sytest/subscription","commits_url":"https://api.github.com/repos/matrix-org/sytest/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/sytest/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/sytest/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/sytest/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/sytest/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/sytest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/sytest/merges","archive_url":"https://api.github.com/repos/matrix-org/sytest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/sytest/downloads","issues_url":"https://api.github.com/repos/matrix-org/sytest/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/sytest/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/sytest/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/sytest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/sytest/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/sytest/releases{/id}","created_at":"2014-08-28T17:05:43Z","updated_at":"2015-05-26T09:36:45Z","pushed_at":"2015-10-09T19:10:47Z","git_url":"git://github.com/matrix-org/sytest.git","ssh_url":"git@github.com:matrix-org/sytest.git","clone_url":"https://github.com/matrix-org/sytest.git","svn_url":"https://github.com/matrix-org/sytest","homepage":"","size":2066,"stargazers_count":2,"watchers_count":2,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"matrix-org:develop","ref":"develop","sha":"80f41272167e4f1f5c3e6bde38953b2ee8d61c8c","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":23436169,"name":"sytest","full_name":"matrix-org/sytest","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/sytest","description":"Black-box integration testing for Matrix homeservers","fork":false,"url":"https://api.github.com/repos/matrix-org/sytest","forks_url":"https://api.github.com/repos/matrix-org/sytest/forks","keys_url":"https://api.github.com/repos/matrix-org/sytest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/sytest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/sytest/teams","hooks_url":"https://api.github.com/repos/matrix-org/sytest/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/sytest/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/sytest/events","assignees_url":"https://api.github.com/repos/matrix-org/sytest/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/sytest/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/sytest/tags","blobs_url":"https://api.github.com/repos/matrix-org/sytest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/sytest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/sytest/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/sytest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/sytest/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/sytest/languages","stargazers_url":"https://api.github.com/repos/matrix-org/sytest/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/sytest/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/sytest/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/sytest/subscription","commits_url":"https://api.github.com/repos/matrix-org/sytest/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/sytest/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/sytest/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/sytest/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/sytest/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/sytest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/sytest/merges","archive_url":"https://api.github.com/repos/matrix-org/sytest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/sytest/downloads","issues_url":"https://api.github.com/repos/matrix-org/sytest/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/sytest/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/sytest/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/sytest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/sytest/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/sytest/releases{/id}","created_at":"2014-08-28T17:05:43Z","updated_at":"2015-05-26T09:36:45Z","pushed_at":"2015-10-09T19:10:47Z","git_url":"git://github.com/matrix-org/sytest.git","ssh_url":"git@github.com:matrix-org/sytest.git","clone_url":"https://github.com/matrix-org/sytest.git","svn_url":"https://github.com/matrix-org/sytest","homepage":"","size":2066,"stargazers_count":2,"watchers_count":2,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/sytest/pulls/20"},"html":{"href":"https://github.com/matrix-org/sytest/pull/20"},"issue":{"href":"https://api.github.com/repos/matrix-org/sytest/issues/20"},"comments":{"href":"https://api.github.com/repos/matrix-org/sytest/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/sytest/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/sytest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/sytest/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/sytest/statuses/d8a1e75a24ef0bbb74b92b77502ee92fbc2ba976"}}}}