{"action":"created","comment":{"url":"https://api.github.com/repos/kaaproject/sample-apps/pulls/comments/81358851","pull_request_review_id":2330338,"id":81358851,"diff_hunk":"@@ -240,14 +174,158 @@ kaa_error_t kaa_on_attach_success(void *context)\n \n kaa_error_t kaa_on_attach_failed(void *context, user_verifier_error_code_t error_code, const char *reason)\n {\n-    KAA_DEMO_UNUSED(context);\n+    (void)context;\n \n     printf(\"Kaa Demo attach failed: error %d, reason '%s'\\n\", error_code, (reason ? reason : \"null\"));\n \n-    is_shutdown = true;\n     return KAA_ERR_NONE;\n }\n \n+void kaa_on_change_chat(void *context,\n+                        kaa_chat_chat_event_t *event,\n+                        kaa_endpoint_id_p source)\n+{\n+    (void)context;\n+    (void)source;\n+\n+    if (event->event_type == ENUM_CHAT_EVENT_TYPE_CREATE) {\n+        push(&lst, event->chat_name->data);\n+    }\n+    else\n+    {\n+        pop(&lst, event->chat_name->data);\n+    }\n+}\n+\n+void kaa_on_receive_message(void *context,\n+                    kaa_chat_message_t *event,\n+                    kaa_endpoint_id_p source)\n+{\n+    if (!strcmp(current_room, event->chat_name->data)) {\n+        puts(event->message->data);\n+    }\n+}\n+\n+void search_room(List *lst, char *room_name)\n+{\n+    for (Room *tmp = lst->head; tmp; tmp = tmp->next) {\n+        if (!strcmp(room_name, tmp->room_name)) {\n+            printf(\"Room %s was founded. Join to the room. Put /quit for leave this room.\\n\");\n+            strcpy(current_room, room_name);\n+            char message[100];\n+            fflush(stdout);\n+            fgets(message, 100, stdin);","path":"eventdemo/source/c/src/kaa_demo.c","position":null,"original_position":337,"commit_id":"44fc19d5158bf92c9b97df9bc287e03307c1dde9","original_commit_id":"fc87e2a4497e90be47887d51d42d4202fd3d3ee7","user":{"login":"Slash32","id":19823389,"avatar_url":"https://avatars.githubusercontent.com/u/19823389?v=3","gravatar_id":"","url":"https://api.github.com/users/Slash32","html_url":"https://github.com/Slash32","followers_url":"https://api.github.com/users/Slash32/followers","following_url":"https://api.github.com/users/Slash32/following{/other_user}","gists_url":"https://api.github.com/users/Slash32/gists{/gist_id}","starred_url":"https://api.github.com/users/Slash32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slash32/subscriptions","organizations_url":"https://api.github.com/users/Slash32/orgs","repos_url":"https://api.github.com/users/Slash32/repos","events_url":"https://api.github.com/users/Slash32/events{/privacy}","received_events_url":"https://api.github.com/users/Slash32/received_events","type":"User","site_admin":false},"body":"Magic number","created_at":"2016-09-30T15:17:08Z","updated_at":"2016-09-30T15:17:55Z","html_url":"https://github.com/kaaproject/sample-apps/pull/282#discussion_r81358851","pull_request_url":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282","_links":{"self":{"href":"https://api.github.com/repos/kaaproject/sample-apps/pulls/comments/81358851"},"html":{"href":"https://github.com/kaaproject/sample-apps/pull/282#discussion_r81358851"},"pull_request":{"href":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282"}}},"pull_request":{"url":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282","id":87351262,"html_url":"https://github.com/kaaproject/sample-apps/pull/282","diff_url":"https://github.com/kaaproject/sample-apps/pull/282.diff","patch_url":"https://github.com/kaaproject/sample-apps/pull/282.patch","issue_url":"https://api.github.com/repos/kaaproject/sample-apps/issues/282","number":282,"state":"open","locked":false,"title":"APP-161: [C] Basic level Apps: Events","user":{"login":"Dubland","id":10281806,"avatar_url":"https://avatars.githubusercontent.com/u/10281806?v=3","gravatar_id":"","url":"https://api.github.com/users/Dubland","html_url":"https://github.com/Dubland","followers_url":"https://api.github.com/users/Dubland/followers","following_url":"https://api.github.com/users/Dubland/following{/other_user}","gists_url":"https://api.github.com/users/Dubland/gists{/gist_id}","starred_url":"https://api.github.com/users/Dubland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dubland/subscriptions","organizations_url":"https://api.github.com/users/Dubland/orgs","repos_url":"https://api.github.com/users/Dubland/repos","events_url":"https://api.github.com/users/Dubland/events{/privacy}","received_events_url":"https://api.github.com/users/Dubland/received_events","type":"User","site_admin":false},"body":"/cc @Slash32 @vadimol @RostakaGmfun ","created_at":"2016-09-29T16:47:30Z","updated_at":"2016-09-30T15:17:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93b48921efaba677b1dacc1587ffa9d71a811b46","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282/commits","review_comments_url":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282/comments","review_comment_url":"https://api.github.com/repos/kaaproject/sample-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaaproject/sample-apps/issues/282/comments","statuses_url":"https://api.github.com/repos/kaaproject/sample-apps/statuses/44fc19d5158bf92c9b97df9bc287e03307c1dde9","head":{"label":"Dubland:APP-161","ref":"APP-161","sha":"44fc19d5158bf92c9b97df9bc287e03307c1dde9","user":{"login":"Dubland","id":10281806,"avatar_url":"https://avatars.githubusercontent.com/u/10281806?v=3","gravatar_id":"","url":"https://api.github.com/users/Dubland","html_url":"https://github.com/Dubland","followers_url":"https://api.github.com/users/Dubland/followers","following_url":"https://api.github.com/users/Dubland/following{/other_user}","gists_url":"https://api.github.com/users/Dubland/gists{/gist_id}","starred_url":"https://api.github.com/users/Dubland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dubland/subscriptions","organizations_url":"https://api.github.com/users/Dubland/orgs","repos_url":"https://api.github.com/users/Dubland/repos","events_url":"https://api.github.com/users/Dubland/events{/privacy}","received_events_url":"https://api.github.com/users/Dubland/received_events","type":"User","site_admin":false},"repo":{"id":54912255,"name":"sample-apps","full_name":"Dubland/sample-apps","owner":{"login":"Dubland","id":10281806,"avatar_url":"https://avatars.githubusercontent.com/u/10281806?v=3","gravatar_id":"","url":"https://api.github.com/users/Dubland","html_url":"https://github.com/Dubland","followers_url":"https://api.github.com/users/Dubland/followers","following_url":"https://api.github.com/users/Dubland/following{/other_user}","gists_url":"https://api.github.com/users/Dubland/gists{/gist_id}","starred_url":"https://api.github.com/users/Dubland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dubland/subscriptions","organizations_url":"https://api.github.com/users/Dubland/orgs","repos_url":"https://api.github.com/users/Dubland/repos","events_url":"https://api.github.com/users/Dubland/events{/privacy}","received_events_url":"https://api.github.com/users/Dubland/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dubland/sample-apps","description":"Sample applications for Kaa Sandbox","fork":true,"url":"https://api.github.com/repos/Dubland/sample-apps","forks_url":"https://api.github.com/repos/Dubland/sample-apps/forks","keys_url":"https://api.github.com/repos/Dubland/sample-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dubland/sample-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dubland/sample-apps/teams","hooks_url":"https://api.github.com/repos/Dubland/sample-apps/hooks","issue_events_url":"https://api.github.com/repos/Dubland/sample-apps/issues/events{/number}","events_url":"https://api.github.com/repos/Dubland/sample-apps/events","assignees_url":"https://api.github.com/repos/Dubland/sample-apps/assignees{/user}","branches_url":"https://api.github.com/repos/Dubland/sample-apps/branches{/branch}","tags_url":"https://api.github.com/repos/Dubland/sample-apps/tags","blobs_url":"https://api.github.com/repos/Dubland/sample-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dubland/sample-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dubland/sample-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dubland/sample-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dubland/sample-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/Dubland/sample-apps/languages","stargazers_url":"https://api.github.com/repos/Dubland/sample-apps/stargazers","contributors_url":"https://api.github.com/repos/Dubland/sample-apps/contributors","subscribers_url":"https://api.github.com/repos/Dubland/sample-apps/subscribers","subscription_url":"https://api.github.com/repos/Dubland/sample-apps/subscription","commits_url":"https://api.github.com/repos/Dubland/sample-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dubland/sample-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dubland/sample-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dubland/sample-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dubland/sample-apps/contents/{+path}","compare_url":"https://api.github.com/repos/Dubland/sample-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dubland/sample-apps/merges","archive_url":"https://api.github.com/repos/Dubland/sample-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dubland/sample-apps/downloads","issues_url":"https://api.github.com/repos/Dubland/sample-apps/issues{/number}","pulls_url":"https://api.github.com/repos/Dubland/sample-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/Dubland/sample-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/Dubland/sample-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dubland/sample-apps/labels{/name}","releases_url":"https://api.github.com/repos/Dubland/sample-apps/releases{/id}","deployments_url":"https://api.github.com/repos/Dubland/sample-apps/deployments","created_at":"2016-03-28T18:01:29Z","updated_at":"2016-03-28T18:01:35Z","pushed_at":"2016-09-30T14:58:15Z","git_url":"git://github.com/Dubland/sample-apps.git","ssh_url":"git@github.com:Dubland/sample-apps.git","clone_url":"https://github.com/Dubland/sample-apps.git","svn_url":"https://github.com/Dubland/sample-apps","homepage":null,"size":236131,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kaaproject:develop","ref":"develop","sha":"65dcab4e180a55f3a89d8ae7bab3069ebd2bee72","user":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":40200503,"name":"sample-apps","full_name":"kaaproject/sample-apps","owner":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaaproject/sample-apps","description":"Sample applications for Kaa Sandbox","fork":false,"url":"https://api.github.com/repos/kaaproject/sample-apps","forks_url":"https://api.github.com/repos/kaaproject/sample-apps/forks","keys_url":"https://api.github.com/repos/kaaproject/sample-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaaproject/sample-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaaproject/sample-apps/teams","hooks_url":"https://api.github.com/repos/kaaproject/sample-apps/hooks","issue_events_url":"https://api.github.com/repos/kaaproject/sample-apps/issues/events{/number}","events_url":"https://api.github.com/repos/kaaproject/sample-apps/events","assignees_url":"https://api.github.com/repos/kaaproject/sample-apps/assignees{/user}","branches_url":"https://api.github.com/repos/kaaproject/sample-apps/branches{/branch}","tags_url":"https://api.github.com/repos/kaaproject/sample-apps/tags","blobs_url":"https://api.github.com/repos/kaaproject/sample-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaaproject/sample-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaaproject/sample-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaaproject/sample-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaaproject/sample-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/kaaproject/sample-apps/languages","stargazers_url":"https://api.github.com/repos/kaaproject/sample-apps/stargazers","contributors_url":"https://api.github.com/repos/kaaproject/sample-apps/contributors","subscribers_url":"https://api.github.com/repos/kaaproject/sample-apps/subscribers","subscription_url":"https://api.github.com/repos/kaaproject/sample-apps/subscription","commits_url":"https://api.github.com/repos/kaaproject/sample-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaaproject/sample-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaaproject/sample-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaaproject/sample-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaaproject/sample-apps/contents/{+path}","compare_url":"https://api.github.com/repos/kaaproject/sample-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaaproject/sample-apps/merges","archive_url":"https://api.github.com/repos/kaaproject/sample-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaaproject/sample-apps/downloads","issues_url":"https://api.github.com/repos/kaaproject/sample-apps/issues{/number}","pulls_url":"https://api.github.com/repos/kaaproject/sample-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/kaaproject/sample-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/kaaproject/sample-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaaproject/sample-apps/labels{/name}","releases_url":"https://api.github.com/repos/kaaproject/sample-apps/releases{/id}","deployments_url":"https://api.github.com/repos/kaaproject/sample-apps/deployments","created_at":"2015-08-04T18:03:04Z","updated_at":"2016-09-25T11:39:42Z","pushed_at":"2016-09-30T14:58:16Z","git_url":"git://github.com/kaaproject/sample-apps.git","ssh_url":"git@github.com:kaaproject/sample-apps.git","clone_url":"https://github.com/kaaproject/sample-apps.git","svn_url":"https://github.com/kaaproject/sample-apps","homepage":null,"size":264795,"stargazers_count":14,"watchers_count":14,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":6,"forks":48,"open_issues":6,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282"},"html":{"href":"https://github.com/kaaproject/sample-apps/pull/282"},"issue":{"href":"https://api.github.com/repos/kaaproject/sample-apps/issues/282"},"comments":{"href":"https://api.github.com/repos/kaaproject/sample-apps/issues/282/comments"},"review_comments":{"href":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282/comments"},"review_comment":{"href":"https://api.github.com/repos/kaaproject/sample-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaaproject/sample-apps/pulls/282/commits"},"statuses":{"href":"https://api.github.com/repos/kaaproject/sample-apps/statuses/44fc19d5158bf92c9b97df9bc287e03307c1dde9"}}}}
{"actor":{"display_login":"Slash32"}}