{"action":"created","comment":{"url":"https://api.github.com/repos/vector-im/riot-ios/pulls/comments/169559463","pull_request_review_id":98102249,"id":169559463,"diff_hunk":"@@ -1097,6 +1113,46 @@ - (void)application:(UIApplication *)application didRegisterUserNotificationSett\n     }\n }\n \n+- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler\n+{\n+    if ([identifier isEqualToString: @\"inline-reply\"])\n+    {\n+        NSString* roomId = notification.userInfo[@\"room_id\"];\n+        if (roomId.length)\n+        {\n+            NSArray* mxAccounts = [MXKAccountManager sharedManager].activeAccounts;\n+            MXRoom* room = nil;\n+            for (MXKAccount* account in mxAccounts)\n+            {\n+                room = [account.mxSession roomWithRoomId:roomId];\n+                if (room)\n+                {\n+                    break;\n+                }\n+            }\n+            if (room == nil)\n+            {\n+                NSLog(@\"[AppDelegate][Push] handleActionWithIdentifier: room with id %@ not found\", roomId);\n+            }\n+            else\n+            {\n+                NSString* responseText = [responseInfo objectForKey:UIUserNotificationActionResponseTypedTextKey];\n+                if (responseText != nil && responseText.length != 0)\n+                {\n+                    NSLog(@\"[AppDelegate][Push] handleActionWithIdentifier: sending message to room: %@\", roomId);\n+                    [room sendTextMessage:responseText success:^(NSString* eventId) {} failure:^(NSError* error) {","path":"Riot/AppDelegate.m","position":57,"original_position":57,"commit_id":"125aecb2713411d3e2f13c514685c1c85fb77039","original_commit_id":"6a90ff0495f52ea3f92e3859090fce7fb18d067f","user":{"login":"manuroe","id":8418515,"avatar_url":"https://avatars0.githubusercontent.com/u/8418515?v=4","gravatar_id":"","url":"https://api.github.com/users/manuroe","html_url":"https://github.com/manuroe","followers_url":"https://api.github.com/users/manuroe/followers","following_url":"https://api.github.com/users/manuroe/following{/other_user}","gists_url":"https://api.github.com/users/manuroe/gists{/gist_id}","starred_url":"https://api.github.com/users/manuroe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuroe/subscriptions","organizations_url":"https://api.github.com/users/manuroe/orgs","repos_url":"https://api.github.com/users/manuroe/repos","events_url":"https://api.github.com/users/manuroe/events{/privacy}","received_events_url":"https://api.github.com/users/manuroe/received_events","type":"User","site_admin":false},"body":"Can you use the `sendTextMessage` method of `MXKRoomDataSource`, instead?\r\nIt does a bit more processing on text before sending. Plus, it will manage local echo if the user opens the room while the message is being sent.","created_at":"2018-02-21T08:11:22Z","updated_at":"2018-02-21T08:23:51Z","html_url":"https://github.com/vector-im/riot-ios/pull/1777#discussion_r169559463","pull_request_url":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/vector-im/riot-ios/pulls/comments/169559463"},"html":{"href":"https://github.com/vector-im/riot-ios/pull/1777#discussion_r169559463"},"pull_request":{"href":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777"}}},"pull_request":{"url":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777","id":170099051,"html_url":"https://github.com/vector-im/riot-ios/pull/1777","diff_url":"https://github.com/vector-im/riot-ios/pull/1777.diff","patch_url":"https://github.com/vector-im/riot-ios/pull/1777.patch","issue_url":"https://api.github.com/repos/vector-im/riot-ios/issues/1777","number":1777,"state":"open","locked":false,"title":"Add support for interactive notifications (fixes #625)","user":{"login":"joeywatts","id":980118,"avatar_url":"https://avatars1.githubusercontent.com/u/980118?v=4","gravatar_id":"","url":"https://api.github.com/users/joeywatts","html_url":"https://github.com/joeywatts","followers_url":"https://api.github.com/users/joeywatts/followers","following_url":"https://api.github.com/users/joeywatts/following{/other_user}","gists_url":"https://api.github.com/users/joeywatts/gists{/gist_id}","starred_url":"https://api.github.com/users/joeywatts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeywatts/subscriptions","organizations_url":"https://api.github.com/users/joeywatts/orgs","repos_url":"https://api.github.com/users/joeywatts/repos","events_url":"https://api.github.com/users/joeywatts/events{/privacy}","received_events_url":"https://api.github.com/users/joeywatts/received_events","type":"User","site_admin":false},"body":"This adds interactive notifications, so that you can quickly reply to messages from the notification. Visually, the feature looks and works exactly like WhatsApp's notification action. If you have the \"Show decrypted content\" setting turned off, the quick reply functionality is disabled for encrypted notifications (since it doesn't make sense to reply to a message before actually seeing its content).\r\n\r\n#625 ","created_at":"2018-02-20T04:28:17Z","updated_at":"2018-02-21T08:23:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f53e9ce21a03628fb343d1bef0f2b722cedc4303","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777/commits","review_comments_url":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777/comments","review_comment_url":"https://api.github.com/repos/vector-im/riot-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vector-im/riot-ios/issues/1777/comments","statuses_url":"https://api.github.com/repos/vector-im/riot-ios/statuses/125aecb2713411d3e2f13c514685c1c85fb77039","head":{"label":"joeywatts:quick-reply","ref":"quick-reply","sha":"125aecb2713411d3e2f13c514685c1c85fb77039","user":{"login":"joeywatts","id":980118,"avatar_url":"https://avatars1.githubusercontent.com/u/980118?v=4","gravatar_id":"","url":"https://api.github.com/users/joeywatts","html_url":"https://github.com/joeywatts","followers_url":"https://api.github.com/users/joeywatts/followers","following_url":"https://api.github.com/users/joeywatts/following{/other_user}","gists_url":"https://api.github.com/users/joeywatts/gists{/gist_id}","starred_url":"https://api.github.com/users/joeywatts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeywatts/subscriptions","organizations_url":"https://api.github.com/users/joeywatts/orgs","repos_url":"https://api.github.com/users/joeywatts/repos","events_url":"https://api.github.com/users/joeywatts/events{/privacy}","received_events_url":"https://api.github.com/users/joeywatts/received_events","type":"User","site_admin":false},"repo":{"id":117593011,"name":"riot-ios","full_name":"joeywatts/riot-ios","owner":{"login":"joeywatts","id":980118,"avatar_url":"https://avatars1.githubusercontent.com/u/980118?v=4","gravatar_id":"","url":"https://api.github.com/users/joeywatts","html_url":"https://github.com/joeywatts","followers_url":"https://api.github.com/users/joeywatts/followers","following_url":"https://api.github.com/users/joeywatts/following{/other_user}","gists_url":"https://api.github.com/users/joeywatts/gists{/gist_id}","starred_url":"https://api.github.com/users/joeywatts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeywatts/subscriptions","organizations_url":"https://api.github.com/users/joeywatts/orgs","repos_url":"https://api.github.com/users/joeywatts/repos","events_url":"https://api.github.com/users/joeywatts/events{/privacy}","received_events_url":"https://api.github.com/users/joeywatts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joeywatts/riot-ios","description":"A glossy Matrix collaboration client for iOS","fork":true,"url":"https://api.github.com/repos/joeywatts/riot-ios","forks_url":"https://api.github.com/repos/joeywatts/riot-ios/forks","keys_url":"https://api.github.com/repos/joeywatts/riot-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joeywatts/riot-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joeywatts/riot-ios/teams","hooks_url":"https://api.github.com/repos/joeywatts/riot-ios/hooks","issue_events_url":"https://api.github.com/repos/joeywatts/riot-ios/issues/events{/number}","events_url":"https://api.github.com/repos/joeywatts/riot-ios/events","assignees_url":"https://api.github.com/repos/joeywatts/riot-ios/assignees{/user}","branches_url":"https://api.github.com/repos/joeywatts/riot-ios/branches{/branch}","tags_url":"https://api.github.com/repos/joeywatts/riot-ios/tags","blobs_url":"https://api.github.com/repos/joeywatts/riot-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joeywatts/riot-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joeywatts/riot-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/joeywatts/riot-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joeywatts/riot-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/joeywatts/riot-ios/languages","stargazers_url":"https://api.github.com/repos/joeywatts/riot-ios/stargazers","contributors_url":"https://api.github.com/repos/joeywatts/riot-ios/contributors","subscribers_url":"https://api.github.com/repos/joeywatts/riot-ios/subscribers","subscription_url":"https://api.github.com/repos/joeywatts/riot-ios/subscription","commits_url":"https://api.github.com/repos/joeywatts/riot-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/joeywatts/riot-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/joeywatts/riot-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/joeywatts/riot-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/joeywatts/riot-ios/contents/{+path}","compare_url":"https://api.github.com/repos/joeywatts/riot-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joeywatts/riot-ios/merges","archive_url":"https://api.github.com/repos/joeywatts/riot-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joeywatts/riot-ios/downloads","issues_url":"https://api.github.com/repos/joeywatts/riot-ios/issues{/number}","pulls_url":"https://api.github.com/repos/joeywatts/riot-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/joeywatts/riot-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/joeywatts/riot-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joeywatts/riot-ios/labels{/name}","releases_url":"https://api.github.com/repos/joeywatts/riot-ios/releases{/id}","deployments_url":"https://api.github.com/repos/joeywatts/riot-ios/deployments","created_at":"2018-01-15T20:38:55Z","updated_at":"2018-01-15T20:38:58Z","pushed_at":"2018-02-20T04:20:50Z","git_url":"git://github.com/joeywatts/riot-ios.git","ssh_url":"git@github.com:joeywatts/riot-ios.git","clone_url":"https://github.com/joeywatts/riot-ios.git","svn_url":"https://github.com/joeywatts/riot-ios","homepage":"https://riot.im","size":69200,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vector-im:develop","ref":"develop","sha":"77c47bffe08776190a7ea239e50d1c42f04948f4","user":{"login":"vector-im","id":13446337,"avatar_url":"https://avatars0.githubusercontent.com/u/13446337?v=4","gravatar_id":"","url":"https://api.github.com/users/vector-im","html_url":"https://github.com/vector-im","followers_url":"https://api.github.com/users/vector-im/followers","following_url":"https://api.github.com/users/vector-im/following{/other_user}","gists_url":"https://api.github.com/users/vector-im/gists{/gist_id}","starred_url":"https://api.github.com/users/vector-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vector-im/subscriptions","organizations_url":"https://api.github.com/users/vector-im/orgs","repos_url":"https://api.github.com/users/vector-im/repos","events_url":"https://api.github.com/users/vector-im/events{/privacy}","received_events_url":"https://api.github.com/users/vector-im/received_events","type":"Organization","site_admin":false},"repo":{"id":40301833,"name":"riot-ios","full_name":"vector-im/riot-ios","owner":{"login":"vector-im","id":13446337,"avatar_url":"https://avatars0.githubusercontent.com/u/13446337?v=4","gravatar_id":"","url":"https://api.github.com/users/vector-im","html_url":"https://github.com/vector-im","followers_url":"https://api.github.com/users/vector-im/followers","following_url":"https://api.github.com/users/vector-im/following{/other_user}","gists_url":"https://api.github.com/users/vector-im/gists{/gist_id}","starred_url":"https://api.github.com/users/vector-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vector-im/subscriptions","organizations_url":"https://api.github.com/users/vector-im/orgs","repos_url":"https://api.github.com/users/vector-im/repos","events_url":"https://api.github.com/users/vector-im/events{/privacy}","received_events_url":"https://api.github.com/users/vector-im/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vector-im/riot-ios","description":"A glossy Matrix collaboration client for iOS","fork":true,"url":"https://api.github.com/repos/vector-im/riot-ios","forks_url":"https://api.github.com/repos/vector-im/riot-ios/forks","keys_url":"https://api.github.com/repos/vector-im/riot-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vector-im/riot-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vector-im/riot-ios/teams","hooks_url":"https://api.github.com/repos/vector-im/riot-ios/hooks","issue_events_url":"https://api.github.com/repos/vector-im/riot-ios/issues/events{/number}","events_url":"https://api.github.com/repos/vector-im/riot-ios/events","assignees_url":"https://api.github.com/repos/vector-im/riot-ios/assignees{/user}","branches_url":"https://api.github.com/repos/vector-im/riot-ios/branches{/branch}","tags_url":"https://api.github.com/repos/vector-im/riot-ios/tags","blobs_url":"https://api.github.com/repos/vector-im/riot-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vector-im/riot-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vector-im/riot-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/vector-im/riot-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vector-im/riot-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/vector-im/riot-ios/languages","stargazers_url":"https://api.github.com/repos/vector-im/riot-ios/stargazers","contributors_url":"https://api.github.com/repos/vector-im/riot-ios/contributors","subscribers_url":"https://api.github.com/repos/vector-im/riot-ios/subscribers","subscription_url":"https://api.github.com/repos/vector-im/riot-ios/subscription","commits_url":"https://api.github.com/repos/vector-im/riot-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/vector-im/riot-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/vector-im/riot-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/vector-im/riot-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/vector-im/riot-ios/contents/{+path}","compare_url":"https://api.github.com/repos/vector-im/riot-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vector-im/riot-ios/merges","archive_url":"https://api.github.com/repos/vector-im/riot-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vector-im/riot-ios/downloads","issues_url":"https://api.github.com/repos/vector-im/riot-ios/issues{/number}","pulls_url":"https://api.github.com/repos/vector-im/riot-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/vector-im/riot-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/vector-im/riot-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vector-im/riot-ios/labels{/name}","releases_url":"https://api.github.com/repos/vector-im/riot-ios/releases{/id}","deployments_url":"https://api.github.com/repos/vector-im/riot-ios/deployments","created_at":"2015-08-06T11:42:09Z","updated_at":"2018-02-18T17:00:21Z","pushed_at":"2018-02-20T17:18:29Z","git_url":"git://github.com/vector-im/riot-ios.git","ssh_url":"git@github.com:vector-im/riot-ios.git","clone_url":"https://github.com/vector-im/riot-ios.git","svn_url":"https://github.com/vector-im/riot-ios","homepage":"https://riot.im","size":71819,"stargazers_count":222,"watchers_count":222,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":89,"mirror_url":null,"archived":false,"open_issues_count":593,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":89,"open_issues":593,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777"},"html":{"href":"https://github.com/vector-im/riot-ios/pull/1777"},"issue":{"href":"https://api.github.com/repos/vector-im/riot-ios/issues/1777"},"comments":{"href":"https://api.github.com/repos/vector-im/riot-ios/issues/1777/comments"},"review_comments":{"href":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777/comments"},"review_comment":{"href":"https://api.github.com/repos/vector-im/riot-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vector-im/riot-ios/pulls/1777/commits"},"statuses":{"href":"https://api.github.com/repos/vector-im/riot-ios/statuses/125aecb2713411d3e2f13c514685c1c85fb77039"}},"author_association":"NONE"}}
{"actor":{"display_login":"manuroe"}}