{"action":"created","comment":{"url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments/93637289","pull_request_review_id":14169013,"id":93637289,"diff_hunk":"@@ -621,23 +621,30 @@ class z.conversation.ConversationRepository\n         callback next_conversation_et\n       else\n         @archive_conversation conversation_et, next_conversation_et\n-    .catch (error) =>\n-      @logger.error \"Failed to leave conversation (#{conversation_et.id}): #{error}\"\n \n   ###\n-  Remove member from conversation.\n+  Remove bot from conversation.\n+  @param conversation_et [z.entity.Conversation] Conversation to remove member from\n+  @param user_id [String] ID of bot to be removed from the the conversation\n+  ###\n+  remove_bot: (conversation_et, user_id) =>\n+    @conversation_service.delete_bots conversation_et.id, user_id\n+    .then (response) ->\n+      if response\n+        amplify.publish z.event.WebApp.EVENT.INJECT, response\n+        return response\n \n+  ###\n+  Remove member from conversation.\n   @param conversation_et [z.entity.Conversation] Conversation to remove member from\n   @param user_id [String] ID of member to be removed from the the conversation\n-  @param callback [Function] Function to be called on server return\n   ###\n-  remove_member: (conversation_et, user_id, callback) =>\n+  remove_member: (conversation_et, user_id) =>\n     @conversation_service.delete_members conversation_et.id, user_id\n     .then (response) ->\n-      amplify.publish z.event.WebApp.EVENT.INJECT, response\n-      callback?()\n-    .catch (error) =>\n-      @logger.error \"Failed to remove member from conversation (#{conversation_et.id}): #{error}\"\n+      if response","path":"app/script/conversation/ConversationRepository.coffee","position":35,"original_position":34,"commit_id":"7b6ef4fb4a33a57bb96858ad0dac6b655cd4e12e","original_commit_id":"f2d6c3f343bac5ef7b73a5d8884c89abce39a81c","user":{"login":"gregor","id":10243309,"avatar_url":"https://avatars.githubusercontent.com/u/10243309?v=3","gravatar_id":"","url":"https://api.github.com/users/gregor","html_url":"https://github.com/gregor","followers_url":"https://api.github.com/users/gregor/followers","following_url":"https://api.github.com/users/gregor/following{/other_user}","gists_url":"https://api.github.com/users/gregor/gists{/gist_id}","starred_url":"https://api.github.com/users/gregor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregor/subscriptions","organizations_url":"https://api.github.com/users/gregor/orgs","repos_url":"https://api.github.com/users/gregor/repos","events_url":"https://api.github.com/users/gregor/events{/privacy}","received_events_url":"https://api.github.com/users/gregor/received_events","type":"User","site_admin":false},"body":"Nothing. It means the user was not part of the conversation and we should not inject undefined. Tried that. Everything breaks.","created_at":"2016-12-22T14:59:51Z","updated_at":"2016-12-22T15:02:05Z","html_url":"https://github.com/wireapp/wire-webapp/pull/597#discussion_r93637289","pull_request_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597","_links":{"self":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments/93637289"},"html":{"href":"https://github.com/wireapp/wire-webapp/pull/597#discussion_r93637289"},"pull_request":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597"}}},"pull_request":{"url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597","id":99116169,"html_url":"https://github.com/wireapp/wire-webapp/pull/597","diff_url":"https://github.com/wireapp/wire-webapp/pull/597.diff","patch_url":"https://github.com/wireapp/wire-webapp/pull/597.patch","issue_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/597","number":597,"state":"open","locked":false,"title":"Bots (WEBAPP-2077)","user":{"login":"gregor","id":10243309,"avatar_url":"https://avatars.githubusercontent.com/u/10243309?v=3","gravatar_id":"","url":"https://api.github.com/users/gregor","html_url":"https://github.com/gregor","followers_url":"https://api.github.com/users/gregor/followers","following_url":"https://api.github.com/users/gregor/following{/other_user}","gists_url":"https://api.github.com/users/gregor/gists{/gist_id}","starred_url":"https://api.github.com/users/gregor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregor/subscriptions","organizations_url":"https://api.github.com/users/gregor/orgs","repos_url":"https://api.github.com/users/gregor/repos","events_url":"https://api.github.com/users/gregor/events{/privacy}","received_events_url":"https://api.github.com/users/gregor/received_events","type":"User","site_admin":false},"body":"- URLs are backend environment depending (bot and announcements API, password reset link)\r\n- added the ability to remove a bot from a conversation\r\n\r\nTo remove a bot you currently need a little workaround, we have no meaning of identifying a user as a bot in a conversation right now. If you want to remove a bot you have to set such flag manually. In a 1to1 conversation you can simply do so with the following command from the console while in that conversation:\r\n\r\n`wire.app.repository.conversation.active_conversation().participating_user_ets()[0].is_bot(true)`\r\n\r\n\r\n","created_at":"2016-12-22T14:51:10Z","updated_at":"2016-12-22T15:02:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f89cbae6614cc19e49fee9a2461b6a6a7d94871","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597/commits","review_comments_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597/comments","review_comment_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/597/comments","statuses_url":"https://api.github.com/repos/wireapp/wire-webapp/statuses/7b6ef4fb4a33a57bb96858ad0dac6b655cd4e12e","head":{"label":"wireapp:bots","ref":"bots","sha":"7b6ef4fb4a33a57bb96858ad0dac6b655cd4e12e","user":{"login":"wireapp","id":16047324,"avatar_url":"https://avatars.githubusercontent.com/u/16047324?v=3","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"repo":{"id":63881328,"name":"wire-webapp","full_name":"wireapp/wire-webapp","owner":{"login":"wireapp","id":16047324,"avatar_url":"https://avatars.githubusercontent.com/u/16047324?v=3","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wireapp/wire-webapp","description":"👽 Wire for Web — Modern communication. Full privacy.","fork":false,"url":"https://api.github.com/repos/wireapp/wire-webapp","forks_url":"https://api.github.com/repos/wireapp/wire-webapp/forks","keys_url":"https://api.github.com/repos/wireapp/wire-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wireapp/wire-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wireapp/wire-webapp/teams","hooks_url":"https://api.github.com/repos/wireapp/wire-webapp/hooks","issue_events_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/wireapp/wire-webapp/events","assignees_url":"https://api.github.com/repos/wireapp/wire-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/wireapp/wire-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/wireapp/wire-webapp/tags","blobs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wireapp/wire-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/wireapp/wire-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wireapp/wire-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/wireapp/wire-webapp/languages","stargazers_url":"https://api.github.com/repos/wireapp/wire-webapp/stargazers","contributors_url":"https://api.github.com/repos/wireapp/wire-webapp/contributors","subscribers_url":"https://api.github.com/repos/wireapp/wire-webapp/subscribers","subscription_url":"https://api.github.com/repos/wireapp/wire-webapp/subscription","commits_url":"https://api.github.com/repos/wireapp/wire-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/wireapp/wire-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/wireapp/wire-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/wireapp/wire-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/wireapp/wire-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wireapp/wire-webapp/merges","archive_url":"https://api.github.com/repos/wireapp/wire-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wireapp/wire-webapp/downloads","issues_url":"https://api.github.com/repos/wireapp/wire-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/wireapp/wire-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/wireapp/wire-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wireapp/wire-webapp/labels{/name}","releases_url":"https://api.github.com/repos/wireapp/wire-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/wireapp/wire-webapp/deployments","created_at":"2016-07-21T15:34:05Z","updated_at":"2016-12-21T14:18:56Z","pushed_at":"2016-12-22T15:02:02Z","git_url":"git://github.com/wireapp/wire-webapp.git","ssh_url":"git@github.com:wireapp/wire-webapp.git","clone_url":"https://github.com/wireapp/wire-webapp.git","svn_url":"https://github.com/wireapp/wire-webapp","homepage":"https://app.wire.com","size":11271,"stargazers_count":535,"watchers_count":535,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":58,"forks":85,"open_issues":58,"watchers":535,"default_branch":"dev"}},"base":{"label":"wireapp:dev","ref":"dev","sha":"6f9fd57f59658bc3f83e7de0eafc736b57bfdbc6","user":{"login":"wireapp","id":16047324,"avatar_url":"https://avatars.githubusercontent.com/u/16047324?v=3","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"repo":{"id":63881328,"name":"wire-webapp","full_name":"wireapp/wire-webapp","owner":{"login":"wireapp","id":16047324,"avatar_url":"https://avatars.githubusercontent.com/u/16047324?v=3","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wireapp/wire-webapp","description":"👽 Wire for Web — Modern communication. Full privacy.","fork":false,"url":"https://api.github.com/repos/wireapp/wire-webapp","forks_url":"https://api.github.com/repos/wireapp/wire-webapp/forks","keys_url":"https://api.github.com/repos/wireapp/wire-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wireapp/wire-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wireapp/wire-webapp/teams","hooks_url":"https://api.github.com/repos/wireapp/wire-webapp/hooks","issue_events_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/wireapp/wire-webapp/events","assignees_url":"https://api.github.com/repos/wireapp/wire-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/wireapp/wire-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/wireapp/wire-webapp/tags","blobs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wireapp/wire-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/wireapp/wire-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wireapp/wire-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/wireapp/wire-webapp/languages","stargazers_url":"https://api.github.com/repos/wireapp/wire-webapp/stargazers","contributors_url":"https://api.github.com/repos/wireapp/wire-webapp/contributors","subscribers_url":"https://api.github.com/repos/wireapp/wire-webapp/subscribers","subscription_url":"https://api.github.com/repos/wireapp/wire-webapp/subscription","commits_url":"https://api.github.com/repos/wireapp/wire-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/wireapp/wire-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/wireapp/wire-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/wireapp/wire-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/wireapp/wire-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wireapp/wire-webapp/merges","archive_url":"https://api.github.com/repos/wireapp/wire-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wireapp/wire-webapp/downloads","issues_url":"https://api.github.com/repos/wireapp/wire-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/wireapp/wire-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/wireapp/wire-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wireapp/wire-webapp/labels{/name}","releases_url":"https://api.github.com/repos/wireapp/wire-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/wireapp/wire-webapp/deployments","created_at":"2016-07-21T15:34:05Z","updated_at":"2016-12-21T14:18:56Z","pushed_at":"2016-12-22T15:02:02Z","git_url":"git://github.com/wireapp/wire-webapp.git","ssh_url":"git@github.com:wireapp/wire-webapp.git","clone_url":"https://github.com/wireapp/wire-webapp.git","svn_url":"https://github.com/wireapp/wire-webapp","homepage":"https://app.wire.com","size":11271,"stargazers_count":535,"watchers_count":535,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":58,"forks":85,"open_issues":58,"watchers":535,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597"},"html":{"href":"https://github.com/wireapp/wire-webapp/pull/597"},"issue":{"href":"https://api.github.com/repos/wireapp/wire-webapp/issues/597"},"comments":{"href":"https://api.github.com/repos/wireapp/wire-webapp/issues/597/comments"},"review_comments":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597/comments"},"review_comment":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/597/commits"},"statuses":{"href":"https://api.github.com/repos/wireapp/wire-webapp/statuses/7b6ef4fb4a33a57bb96858ad0dac6b655cd4e12e"}}}}
{"actor":{"display_login":"gregor"}}