{"action":"created","comment":{"url":"https://api.github.com/repos/exodev/social/pulls/comments/236288943","pull_request_review_id":178331943,"id":236288943,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjI4ODk0Mw==","diff_hunk":"@@ -206,6 +206,9 @@ public Response getSpaceById(@Context UriInfo uriInfo,\n     String authenticatedUser = ConversationState.getCurrent().getIdentity().getUserId();\n     SpaceService spaceService = CommonsUtils.getService(SpaceService.class);\n     Space space = spaceService.getSpaceById(id);\n+    if (space == null) {\n+      space = spaceService.getSpaceByPrettyName(id);","path":"component/service/src/main/java/org/exoplatform/social/rest/impl/space/SpaceRestResourcesV1.java","position":14,"original_position":14,"commit_id":"5a7f61d3f0457eceb948f15eba869d1f1f37c001","original_commit_id":"5a7f61d3f0457eceb948f15eba869d1f1f37c001","user":{"login":"thomasdelhomenie","id":342645,"node_id":"MDQ6VXNlcjM0MjY0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/342645?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasdelhomenie","html_url":"https://github.com/thomasdelhomenie","followers_url":"https://api.github.com/users/thomasdelhomenie/followers","following_url":"https://api.github.com/users/thomasdelhomenie/following{/other_user}","gists_url":"https://api.github.com/users/thomasdelhomenie/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasdelhomenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasdelhomenie/subscriptions","organizations_url":"https://api.github.com/users/thomasdelhomenie/orgs","repos_url":"https://api.github.com/users/thomasdelhomenie/repos","events_url":"https://api.github.com/users/thomasdelhomenie/events{/privacy}","received_events_url":"https://api.github.com/users/thomasdelhomenie/received_events","type":"User","site_admin":false},"body":"This can probably cause an issue when a pretty name is a number, for example \"123\", and a space with this id exists. In this case it will retrieve the space with the id 123 whereas the user may want to get the space with the pretty name 123.\r\nI understand that the activity REST service returns the url with the pretty name (/rest/v1/social/spaces/**SPACE_PRETTY_NAME**), so it would be better to allow to use this url directly to retrieve the space. Shouldn't we change this url instead and return the url with the space id (/rest/v1/social/spaces/**SPACE_ID**) ?","created_at":"2018-11-26T15:03:26Z","updated_at":"2018-11-26T15:12:09Z","html_url":"https://github.com/exodev/social/pull/428#discussion_r236288943","pull_request_url":"https://api.github.com/repos/exodev/social/pulls/428","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/exodev/social/pulls/comments/236288943"},"html":{"href":"https://github.com/exodev/social/pull/428#discussion_r236288943"},"pull_request":{"href":"https://api.github.com/repos/exodev/social/pulls/428"}}},"pull_request":{"url":"https://api.github.com/repos/exodev/social/pulls/428","id":232903730,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyOTAzNzMw","html_url":"https://github.com/exodev/social/pull/428","diff_url":"https://github.com/exodev/social/pull/428.diff","patch_url":"https://github.com/exodev/social/pull/428.patch","issue_url":"https://api.github.com/repos/exodev/social/issues/428","number":428,"state":"open","locked":false,"title":"SOC-6128 Fix Activity Owner for spaces activity types","user":{"login":"boubaker","id":594824,"node_id":"MDQ6VXNlcjU5NDgyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/594824?v=4","gravatar_id":"","url":"https://api.github.com/users/boubaker","html_url":"https://github.com/boubaker","followers_url":"https://api.github.com/users/boubaker/followers","following_url":"https://api.github.com/users/boubaker/following{/other_user}","gists_url":"https://api.github.com/users/boubaker/gists{/gist_id}","starred_url":"https://api.github.com/users/boubaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boubaker/subscriptions","organizations_url":"https://api.github.com/users/boubaker/orgs","repos_url":"https://api.github.com/users/boubaker/repos","events_url":"https://api.github.com/users/boubaker/events{/privacy}","received_events_url":"https://api.github.com/users/boubaker/received_events","type":"User","site_admin":false},"body":"When retrieving an activity details using REST Services, the owner is always assumed as \"users\" type while there is some case where the activity owner is a space.\r\nThis fixes the owner URL retrieved in activity details and add the possibility to get the space details by its pretty name as well.","created_at":"2018-11-22T09:07:04Z","updated_at":"2018-11-26T15:12:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17a5df643fce632ccba380a6b57fa57faba5a75c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/exodev/social/pulls/428/commits","review_comments_url":"https://api.github.com/repos/exodev/social/pulls/428/comments","review_comment_url":"https://api.github.com/repos/exodev/social/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exodev/social/issues/428/comments","statuses_url":"https://api.github.com/repos/exodev/social/statuses/5a7f61d3f0457eceb948f15eba869d1f1f37c001","head":{"label":"exodev:fix/SOC-6128","ref":"fix/SOC-6128","sha":"5a7f61d3f0457eceb948f15eba869d1f1f37c001","user":{"login":"exodev","id":1606522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDY1MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1606522?v=4","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"repo":{"id":4003303,"node_id":"MDEwOlJlcG9zaXRvcnk0MDAzMzAz","name":"social","full_name":"exodev/social","private":false,"owner":{"login":"exodev","id":1606522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDY1MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1606522?v=4","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/exodev/social","description":"eXo Social","fork":true,"url":"https://api.github.com/repos/exodev/social","forks_url":"https://api.github.com/repos/exodev/social/forks","keys_url":"https://api.github.com/repos/exodev/social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exodev/social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exodev/social/teams","hooks_url":"https://api.github.com/repos/exodev/social/hooks","issue_events_url":"https://api.github.com/repos/exodev/social/issues/events{/number}","events_url":"https://api.github.com/repos/exodev/social/events","assignees_url":"https://api.github.com/repos/exodev/social/assignees{/user}","branches_url":"https://api.github.com/repos/exodev/social/branches{/branch}","tags_url":"https://api.github.com/repos/exodev/social/tags","blobs_url":"https://api.github.com/repos/exodev/social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exodev/social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exodev/social/git/refs{/sha}","trees_url":"https://api.github.com/repos/exodev/social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exodev/social/statuses/{sha}","languages_url":"https://api.github.com/repos/exodev/social/languages","stargazers_url":"https://api.github.com/repos/exodev/social/stargazers","contributors_url":"https://api.github.com/repos/exodev/social/contributors","subscribers_url":"https://api.github.com/repos/exodev/social/subscribers","subscription_url":"https://api.github.com/repos/exodev/social/subscription","commits_url":"https://api.github.com/repos/exodev/social/commits{/sha}","git_commits_url":"https://api.github.com/repos/exodev/social/git/commits{/sha}","comments_url":"https://api.github.com/repos/exodev/social/comments{/number}","issue_comment_url":"https://api.github.com/repos/exodev/social/issues/comments{/number}","contents_url":"https://api.github.com/repos/exodev/social/contents/{+path}","compare_url":"https://api.github.com/repos/exodev/social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exodev/social/merges","archive_url":"https://api.github.com/repos/exodev/social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exodev/social/downloads","issues_url":"https://api.github.com/repos/exodev/social/issues{/number}","pulls_url":"https://api.github.com/repos/exodev/social/pulls{/number}","milestones_url":"https://api.github.com/repos/exodev/social/milestones{/number}","notifications_url":"https://api.github.com/repos/exodev/social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exodev/social/labels{/name}","releases_url":"https://api.github.com/repos/exodev/social/releases{/id}","deployments_url":"https://api.github.com/repos/exodev/social/deployments","created_at":"2012-04-12T09:45:16Z","updated_at":"2018-11-21T17:17:50Z","pushed_at":"2018-11-25T19:11:12Z","git_url":"git://github.com/exodev/social.git","ssh_url":"git@github.com:exodev/social.git","clone_url":"https://github.com/exodev/social.git","svn_url":"https://github.com/exodev/social","homepage":null,"size":43195,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":20,"open_issues":35,"watchers":9,"default_branch":"develop"}},"base":{"label":"exodev:develop","ref":"develop","sha":"0330d792f28c703e97dcda6e70a114b78776b940","user":{"login":"exodev","id":1606522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDY1MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1606522?v=4","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"repo":{"id":4003303,"node_id":"MDEwOlJlcG9zaXRvcnk0MDAzMzAz","name":"social","full_name":"exodev/social","private":false,"owner":{"login":"exodev","id":1606522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDY1MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1606522?v=4","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/exodev/social","description":"eXo Social","fork":true,"url":"https://api.github.com/repos/exodev/social","forks_url":"https://api.github.com/repos/exodev/social/forks","keys_url":"https://api.github.com/repos/exodev/social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exodev/social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exodev/social/teams","hooks_url":"https://api.github.com/repos/exodev/social/hooks","issue_events_url":"https://api.github.com/repos/exodev/social/issues/events{/number}","events_url":"https://api.github.com/repos/exodev/social/events","assignees_url":"https://api.github.com/repos/exodev/social/assignees{/user}","branches_url":"https://api.github.com/repos/exodev/social/branches{/branch}","tags_url":"https://api.github.com/repos/exodev/social/tags","blobs_url":"https://api.github.com/repos/exodev/social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exodev/social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exodev/social/git/refs{/sha}","trees_url":"https://api.github.com/repos/exodev/social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exodev/social/statuses/{sha}","languages_url":"https://api.github.com/repos/exodev/social/languages","stargazers_url":"https://api.github.com/repos/exodev/social/stargazers","contributors_url":"https://api.github.com/repos/exodev/social/contributors","subscribers_url":"https://api.github.com/repos/exodev/social/subscribers","subscription_url":"https://api.github.com/repos/exodev/social/subscription","commits_url":"https://api.github.com/repos/exodev/social/commits{/sha}","git_commits_url":"https://api.github.com/repos/exodev/social/git/commits{/sha}","comments_url":"https://api.github.com/repos/exodev/social/comments{/number}","issue_comment_url":"https://api.github.com/repos/exodev/social/issues/comments{/number}","contents_url":"https://api.github.com/repos/exodev/social/contents/{+path}","compare_url":"https://api.github.com/repos/exodev/social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exodev/social/merges","archive_url":"https://api.github.com/repos/exodev/social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exodev/social/downloads","issues_url":"https://api.github.com/repos/exodev/social/issues{/number}","pulls_url":"https://api.github.com/repos/exodev/social/pulls{/number}","milestones_url":"https://api.github.com/repos/exodev/social/milestones{/number}","notifications_url":"https://api.github.com/repos/exodev/social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exodev/social/labels{/name}","releases_url":"https://api.github.com/repos/exodev/social/releases{/id}","deployments_url":"https://api.github.com/repos/exodev/social/deployments","created_at":"2012-04-12T09:45:16Z","updated_at":"2018-11-21T17:17:50Z","pushed_at":"2018-11-25T19:11:12Z","git_url":"git://github.com/exodev/social.git","ssh_url":"git@github.com:exodev/social.git","clone_url":"https://github.com/exodev/social.git","svn_url":"https://github.com/exodev/social","homepage":null,"size":43195,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":35,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":20,"open_issues":35,"watchers":9,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/exodev/social/pulls/428"},"html":{"href":"https://github.com/exodev/social/pull/428"},"issue":{"href":"https://api.github.com/repos/exodev/social/issues/428"},"comments":{"href":"https://api.github.com/repos/exodev/social/issues/428/comments"},"review_comments":{"href":"https://api.github.com/repos/exodev/social/pulls/428/comments"},"review_comment":{"href":"https://api.github.com/repos/exodev/social/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exodev/social/pulls/428/commits"},"statuses":{"href":"https://api.github.com/repos/exodev/social/statuses/5a7f61d3f0457eceb948f15eba869d1f1f37c001"}},"author_association":"NONE"}}
{"actor":{"display_login":"thomasdelhomenie"}}