{"action":"created","comment":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/73151278","id":73151278,"diff_hunk":"@@ -0,0 +1,100 @@\n+%%==============================================================================\n+%% Copyright 2016 Erlang Solutions Ltd.\n+%%\n+%% Licensed under the Apache License, Version 2.0 (the \"License\");\n+%% you may not use this file except in compliance with the License.\n+%% You may obtain a copy of the License at\n+%%\n+%% http://www.apache.org/licenses/LICENSE-2.0\n+%%\n+%% Unless required by applicable law or agreed to in writing, software\n+%% distributed under the License is distributed on an \"AS IS\" BASIS,\n+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+%% See the License for the specific language governing permissions and\n+%% limitations under the License.\n+%%\n+%% Author: Joseph Yiasemides <joseph.yiasemides@erlang-solutions.com>\n+%% Description: Administration commands for Mult-user Chat (MUC)\n+%%==============================================================================\n+\n+-module(muc_admin).\n+\n+-behaviour(gen_mod).\n+-export([start/2, stop/1]).\n+\n+-export([create_room/4]).\n+-export([invite_to_room/5]).\n+\n+-include(\"ejabberd.hrl\").\n+-include(\"jlib.hrl\").\n+\n+start(_, _) ->\n+    mongoose_commands:register(commands()).\n+\n+stop(_) ->\n+    mongoose_commands:unregister(commands()).\n+\n+commands() ->\n+    [\n+     [{name, create_muc_room},\n+      {category, muc},\n+      {desc, \"Create a MUC room.\"},\n+      {module, ?MODULE},\n+      {function, create_room},\n+      {action, create},\n+      {identifiers, [domain]},","path":"apps/ejabberd/src/muc_admin.erl","position":45,"original_position":45,"commit_id":"d8ae73aab5143d5271fc007c055fbec6632b0a75","original_commit_id":"d8ae73aab5143d5271fc007c055fbec6632b0a75","user":{"login":"michalwski","id":705828,"avatar_url":"https://avatars.githubusercontent.com/u/705828?v=3","gravatar_id":"","url":"https://api.github.com/users/michalwski","html_url":"https://github.com/michalwski","followers_url":"https://api.github.com/users/michalwski/followers","following_url":"https://api.github.com/users/michalwski/following{/other_user}","gists_url":"https://api.github.com/users/michalwski/gists{/gist_id}","starred_url":"https://api.github.com/users/michalwski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalwski/subscriptions","organizations_url":"https://api.github.com/users/michalwski/orgs","repos_url":"https://api.github.com/users/michalwski/repos","events_url":"https://api.github.com/users/michalwski/events{/privacy}","received_events_url":"https://api.github.com/users/michalwski/received_events","type":"User","site_admin":false},"body":"I think better name would be `host` instead of `domain`.","created_at":"2016-08-02T13:11:26Z","updated_at":"2016-08-02T13:11:26Z","html_url":"https://github.com/esl/MongooseIM/pull/903#discussion_r73151278","pull_request_url":"https://api.github.com/repos/esl/MongooseIM/pulls/903","_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/73151278"},"html":{"href":"https://github.com/esl/MongooseIM/pull/903#discussion_r73151278"},"pull_request":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/903"}}},"pull_request":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/903","id":79708598,"html_url":"https://github.com/esl/MongooseIM/pull/903","diff_url":"https://github.com/esl/MongooseIM/pull/903.diff","patch_url":"https://github.com/esl/MongooseIM/pull/903.patch","issue_url":"https://api.github.com/repos/esl/MongooseIM/issues/903","number":903,"state":"open","locked":false,"title":"MUC HTTP API","user":{"login":"Dzol","id":11424434,"avatar_url":"https://avatars.githubusercontent.com/u/11424434?v=3","gravatar_id":"","url":"https://api.github.com/users/Dzol","html_url":"https://github.com/Dzol","followers_url":"https://api.github.com/users/Dzol/followers","following_url":"https://api.github.com/users/Dzol/following{/other_user}","gists_url":"https://api.github.com/users/Dzol/gists{/gist_id}","starred_url":"https://api.github.com/users/Dzol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dzol/subscriptions","organizations_url":"https://api.github.com/users/Dzol/orgs","repos_url":"https://api.github.com/users/Dzol/repos","events_url":"https://api.github.com/users/Dzol/events{/privacy}","received_events_url":"https://api.github.com/users/Dzol/received_events","type":"User","site_admin":false},"body":"Introduce MVP for the MUC HTTP API:\r\n\r\n- [x] Create room\r\n- [x] Invite to room\r\n- [x] Send message to room\r\n- [ ] Refactor & improve source\r\n- [ ] Improve & expand tests\r\n","created_at":"2016-08-02T10:08:28Z","updated_at":"2016-08-02T13:11:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46a0df5232183def282174928239b8e450220e4a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/esl/MongooseIM/pulls/903/commits","review_comments_url":"https://api.github.com/repos/esl/MongooseIM/pulls/903/comments","review_comment_url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esl/MongooseIM/issues/903/comments","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/d8ae73aab5143d5271fc007c055fbec6632b0a75","head":{"label":"esl:muc-http-api-shorter-prettier","ref":"muc-http-api-shorter-prettier","sha":"d8ae73aab5143d5271fc007c055fbec6632b0a75","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"Jabber / XMPP server with focus on performance and scalability, by Erlang Solutions","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-08-01T20:30:48Z","pushed_at":"2016-08-02T12:58:10Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"https://www.erlang-solutions.com/products/mongooseim.html","size":30048,"stargazers_count":540,"watchers_count":540,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":218,"mirror_url":null,"open_issues_count":88,"forks":218,"open_issues":88,"watchers":540,"default_branch":"master"}},"base":{"label":"esl:master","ref":"master","sha":"557ddd92bb30ff5d12419db71f77b1a0399bb38d","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"Jabber / XMPP server with focus on performance and scalability, by Erlang Solutions","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-08-01T20:30:48Z","pushed_at":"2016-08-02T12:58:10Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"https://www.erlang-solutions.com/products/mongooseim.html","size":30048,"stargazers_count":540,"watchers_count":540,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":218,"mirror_url":null,"open_issues_count":88,"forks":218,"open_issues":88,"watchers":540,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/903"},"html":{"href":"https://github.com/esl/MongooseIM/pull/903"},"issue":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/903"},"comments":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/903/comments"},"review_comments":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/903/comments"},"review_comment":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/903/commits"},"statuses":{"href":"https://api.github.com/repos/esl/MongooseIM/statuses/d8ae73aab5143d5271fc007c055fbec6632b0a75"}}}}
{"actor":{"display_login":"michalwski"}}