{"action":"created","comment":{"url":"https://api.github.com/repos/igniterealtime/Smack/pulls/comments/85710426","pull_request_review_id":6407486,"id":85710426,"diff_hunk":"@@ -0,0 +1,96 @@\n+/**\n+ *\n+ * Copyright 2016 Fernando Ramirez\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+package org.jivesoftware.smackx.bob.element;\n+\n+import org.jivesoftware.smack.packet.Message;\n+import org.jivesoftware.smack.util.XmlStringBuilder;\n+import org.jivesoftware.smackx.bob.BoBHash;\n+import org.jivesoftware.smackx.xhtmlim.XHTMLText;\n+import org.jivesoftware.smackx.xhtmlim.packet.XHTMLExtension;\n+\n+/**\n+ * Bits of Binary extension element.\n+ * \n+ * @author Fernando Ramirez\n+ * @see <a href=\"http://xmpp.org/extensions/xep-0231.html\">XEP-0231: Bits of\n+ *      Binary</a>\n+ */\n+public class BoBExtension extends XHTMLExtension {\n+\n+    private BoBHash bobHash;\n+    private String alt;\n+    private String paragraph;\n+\n+    /**\n+     * Bits of Binary extension constructor.\n+     * \n+     * @param bobHash\n+     * @param alt\n+     * @param paragraph\n+     */\n+    public BoBExtension(BoBHash bobHash, String alt, String paragraph) {\n+        this.bobHash = bobHash;\n+        this.alt = alt;\n+        this.paragraph = paragraph;\n+    }\n+\n+    /**\n+     * Get the BoB hash.\n+     * \n+     * @return the BoB hash\n+     */\n+    public BoBHash getBoBHash() {\n+        return bobHash;\n+    }\n+\n+    /**\n+     * Get the alt field.\n+     * \n+     * @return the alt field\n+     */\n+    public String getAlt() {\n+        return alt;\n+    }\n+\n+    @Override\n+    public XmlStringBuilder toXML() {\n+        XmlStringBuilder xml = new XmlStringBuilder(this);\n+        xml.rightAngleBracket();\n+\n+        xml.halfOpenElement(Message.BODY);\n+        xml.xmlnsAttribute(XHTMLText.NAMESPACE);\n+        xml.rightAngleBracket();\n+\n+        xml.openElement(XHTMLText.P);\n+        xml.optEscape(paragraph);\n+\n+        xml.halfOpenElement(XHTMLText.IMG);\n+        xml.optAttribute(\"alt\", alt);\n+        xml.attribute(\"src\", bobHash.toSrc());\n+        xml.closeEmptyElement();\n+\n+        xml.closeElement(XHTMLText.P);\n+        xml.closeElement(Message.BODY);\n+        xml.closeElement(this);\n+        return xml;\n+    }\n+\n+    public static BoBExtension from(Message message) {\n+        return (BoBExtension) message.getExtension(ELEMENT, NAMESPACE);","path":"smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBExtension.java","position":93,"original_position":93,"commit_id":"4acb0858d3f63a6e31c4b67942b96e68afbe63b2","original_commit_id":"4acb0858d3f63a6e31c4b67942b96e68afbe63b2","user":{"login":"Flowdalic","id":432385,"avatar_url":"https://avatars.githubusercontent.com/u/432385?v=3","gravatar_id":"","url":"https://api.github.com/users/Flowdalic","html_url":"https://github.com/Flowdalic","followers_url":"https://api.github.com/users/Flowdalic/followers","following_url":"https://api.github.com/users/Flowdalic/following{/other_user}","gists_url":"https://api.github.com/users/Flowdalic/gists{/gist_id}","starred_url":"https://api.github.com/users/Flowdalic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flowdalic/subscriptions","organizations_url":"https://api.github.com/users/Flowdalic/orgs","repos_url":"https://api.github.com/users/Flowdalic/repos","events_url":"https://api.github.com/users/Flowdalic/events{/privacy}","received_events_url":"https://api.github.com/users/Flowdalic/received_events","type":"User","site_admin":false},"body":"I don't think that cast is necessary.","created_at":"2016-10-31T10:04:02Z","updated_at":"2016-10-31T10:15:29Z","html_url":"https://github.com/igniterealtime/Smack/pull/91#discussion_r85710426","pull_request_url":"https://api.github.com/repos/igniterealtime/Smack/pulls/91","_links":{"self":{"href":"https://api.github.com/repos/igniterealtime/Smack/pulls/comments/85710426"},"html":{"href":"https://github.com/igniterealtime/Smack/pull/91#discussion_r85710426"},"pull_request":{"href":"https://api.github.com/repos/igniterealtime/Smack/pulls/91"}}},"pull_request":{"url":"https://api.github.com/repos/igniterealtime/Smack/pulls/91","id":87778074,"html_url":"https://github.com/igniterealtime/Smack/pull/91","diff_url":"https://github.com/igniterealtime/Smack/pull/91.diff","patch_url":"https://github.com/igniterealtime/Smack/pull/91.patch","issue_url":"https://api.github.com/repos/igniterealtime/Smack/issues/91","number":91,"state":"open","locked":false,"title":"XEP-0231: Bits of Binary implementation","user":{"login":"ramabit","id":5194886,"avatar_url":"https://avatars.githubusercontent.com/u/5194886?v=3","gravatar_id":"","url":"https://api.github.com/users/ramabit","html_url":"https://github.com/ramabit","followers_url":"https://api.github.com/users/ramabit/followers","following_url":"https://api.github.com/users/ramabit/following{/other_user}","gists_url":"https://api.github.com/users/ramabit/gists{/gist_id}","starred_url":"https://api.github.com/users/ramabit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramabit/subscriptions","organizations_url":"https://api.github.com/users/ramabit/orgs","repos_url":"https://api.github.com/users/ramabit/repos","events_url":"https://api.github.com/users/ramabit/events{/privacy}","received_events_url":"https://api.github.com/users/ramabit/received_events","type":"User","site_admin":false},"body":"Documentation: http://xmpp.org/extensions/xep-0231.html\n","created_at":"2016-10-03T19:42:12Z","updated_at":"2016-10-31T10:15:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6da43930c210c13c236a22bea63e05ae28b1dc9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/igniterealtime/Smack/pulls/91/commits","review_comments_url":"https://api.github.com/repos/igniterealtime/Smack/pulls/91/comments","review_comment_url":"https://api.github.com/repos/igniterealtime/Smack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/igniterealtime/Smack/issues/91/comments","statuses_url":"https://api.github.com/repos/igniterealtime/Smack/statuses/4acb0858d3f63a6e31c4b67942b96e68afbe63b2","head":{"label":"esl:ramabit.bob","ref":"ramabit.bob","sha":"4acb0858d3f63a6e31c4b67942b96e68afbe63b2","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":55431704,"name":"Smack","full_name":"esl/Smack","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/Smack","description":"A highly modular and portable open source XMPP client library written in Java for JVMs and Android","fork":true,"url":"https://api.github.com/repos/esl/Smack","forks_url":"https://api.github.com/repos/esl/Smack/forks","keys_url":"https://api.github.com/repos/esl/Smack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/Smack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/Smack/teams","hooks_url":"https://api.github.com/repos/esl/Smack/hooks","issue_events_url":"https://api.github.com/repos/esl/Smack/issues/events{/number}","events_url":"https://api.github.com/repos/esl/Smack/events","assignees_url":"https://api.github.com/repos/esl/Smack/assignees{/user}","branches_url":"https://api.github.com/repos/esl/Smack/branches{/branch}","tags_url":"https://api.github.com/repos/esl/Smack/tags","blobs_url":"https://api.github.com/repos/esl/Smack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/Smack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/Smack/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/Smack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/Smack/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/Smack/languages","stargazers_url":"https://api.github.com/repos/esl/Smack/stargazers","contributors_url":"https://api.github.com/repos/esl/Smack/contributors","subscribers_url":"https://api.github.com/repos/esl/Smack/subscribers","subscription_url":"https://api.github.com/repos/esl/Smack/subscription","commits_url":"https://api.github.com/repos/esl/Smack/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/Smack/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/Smack/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/Smack/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/Smack/contents/{+path}","compare_url":"https://api.github.com/repos/esl/Smack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/Smack/merges","archive_url":"https://api.github.com/repos/esl/Smack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/Smack/downloads","issues_url":"https://api.github.com/repos/esl/Smack/issues{/number}","pulls_url":"https://api.github.com/repos/esl/Smack/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/Smack/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/Smack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/Smack/labels{/name}","releases_url":"https://api.github.com/repos/esl/Smack/releases{/id}","deployments_url":"https://api.github.com/repos/esl/Smack/deployments","created_at":"2016-04-04T17:39:49Z","updated_at":"2016-04-04T17:39:55Z","pushed_at":"2016-10-27T17:53:14Z","git_url":"git://github.com/esl/Smack.git","ssh_url":"git@github.com:esl/Smack.git","clone_url":"https://github.com/esl/Smack.git","svn_url":"https://github.com/esl/Smack","homepage":"http://www.igniterealtime.org/projects/smack/","size":24845,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"igniterealtime:master","ref":"master","sha":"9a16f684335c887fc77e8e026e78cca01bf6bf27","user":{"login":"igniterealtime","id":5991032,"avatar_url":"https://avatars.githubusercontent.com/u/5991032?v=3","gravatar_id":"","url":"https://api.github.com/users/igniterealtime","html_url":"https://github.com/igniterealtime","followers_url":"https://api.github.com/users/igniterealtime/followers","following_url":"https://api.github.com/users/igniterealtime/following{/other_user}","gists_url":"https://api.github.com/users/igniterealtime/gists{/gist_id}","starred_url":"https://api.github.com/users/igniterealtime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igniterealtime/subscriptions","organizations_url":"https://api.github.com/users/igniterealtime/orgs","repos_url":"https://api.github.com/users/igniterealtime/repos","events_url":"https://api.github.com/users/igniterealtime/events{/privacy}","received_events_url":"https://api.github.com/users/igniterealtime/received_events","type":"Organization","site_admin":false},"repo":{"id":16477702,"name":"Smack","full_name":"igniterealtime/Smack","owner":{"login":"igniterealtime","id":5991032,"avatar_url":"https://avatars.githubusercontent.com/u/5991032?v=3","gravatar_id":"","url":"https://api.github.com/users/igniterealtime","html_url":"https://github.com/igniterealtime","followers_url":"https://api.github.com/users/igniterealtime/followers","following_url":"https://api.github.com/users/igniterealtime/following{/other_user}","gists_url":"https://api.github.com/users/igniterealtime/gists{/gist_id}","starred_url":"https://api.github.com/users/igniterealtime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igniterealtime/subscriptions","organizations_url":"https://api.github.com/users/igniterealtime/orgs","repos_url":"https://api.github.com/users/igniterealtime/repos","events_url":"https://api.github.com/users/igniterealtime/events{/privacy}","received_events_url":"https://api.github.com/users/igniterealtime/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/igniterealtime/Smack","description":"A highly modular and portable open source XMPP client library written in Java for JVMs and Android","fork":false,"url":"https://api.github.com/repos/igniterealtime/Smack","forks_url":"https://api.github.com/repos/igniterealtime/Smack/forks","keys_url":"https://api.github.com/repos/igniterealtime/Smack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/igniterealtime/Smack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/igniterealtime/Smack/teams","hooks_url":"https://api.github.com/repos/igniterealtime/Smack/hooks","issue_events_url":"https://api.github.com/repos/igniterealtime/Smack/issues/events{/number}","events_url":"https://api.github.com/repos/igniterealtime/Smack/events","assignees_url":"https://api.github.com/repos/igniterealtime/Smack/assignees{/user}","branches_url":"https://api.github.com/repos/igniterealtime/Smack/branches{/branch}","tags_url":"https://api.github.com/repos/igniterealtime/Smack/tags","blobs_url":"https://api.github.com/repos/igniterealtime/Smack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/igniterealtime/Smack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/igniterealtime/Smack/git/refs{/sha}","trees_url":"https://api.github.com/repos/igniterealtime/Smack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/igniterealtime/Smack/statuses/{sha}","languages_url":"https://api.github.com/repos/igniterealtime/Smack/languages","stargazers_url":"https://api.github.com/repos/igniterealtime/Smack/stargazers","contributors_url":"https://api.github.com/repos/igniterealtime/Smack/contributors","subscribers_url":"https://api.github.com/repos/igniterealtime/Smack/subscribers","subscription_url":"https://api.github.com/repos/igniterealtime/Smack/subscription","commits_url":"https://api.github.com/repos/igniterealtime/Smack/commits{/sha}","git_commits_url":"https://api.github.com/repos/igniterealtime/Smack/git/commits{/sha}","comments_url":"https://api.github.com/repos/igniterealtime/Smack/comments{/number}","issue_comment_url":"https://api.github.com/repos/igniterealtime/Smack/issues/comments{/number}","contents_url":"https://api.github.com/repos/igniterealtime/Smack/contents/{+path}","compare_url":"https://api.github.com/repos/igniterealtime/Smack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/igniterealtime/Smack/merges","archive_url":"https://api.github.com/repos/igniterealtime/Smack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/igniterealtime/Smack/downloads","issues_url":"https://api.github.com/repos/igniterealtime/Smack/issues{/number}","pulls_url":"https://api.github.com/repos/igniterealtime/Smack/pulls{/number}","milestones_url":"https://api.github.com/repos/igniterealtime/Smack/milestones{/number}","notifications_url":"https://api.github.com/repos/igniterealtime/Smack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/igniterealtime/Smack/labels{/name}","releases_url":"https://api.github.com/repos/igniterealtime/Smack/releases{/id}","deployments_url":"https://api.github.com/repos/igniterealtime/Smack/deployments","created_at":"2014-02-03T11:36:51Z","updated_at":"2016-10-31T02:43:49Z","pushed_at":"2016-10-31T09:46:54Z","git_url":"git://github.com/igniterealtime/Smack.git","ssh_url":"git@github.com:igniterealtime/Smack.git","clone_url":"https://github.com/igniterealtime/Smack.git","svn_url":"https://github.com/igniterealtime/Smack","homepage":"http://www.igniterealtime.org/projects/smack/","size":25865,"stargazers_count":1102,"watchers_count":1102,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":528,"mirror_url":null,"open_issues_count":9,"forks":528,"open_issues":9,"watchers":1102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/igniterealtime/Smack/pulls/91"},"html":{"href":"https://github.com/igniterealtime/Smack/pull/91"},"issue":{"href":"https://api.github.com/repos/igniterealtime/Smack/issues/91"},"comments":{"href":"https://api.github.com/repos/igniterealtime/Smack/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/igniterealtime/Smack/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/igniterealtime/Smack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/igniterealtime/Smack/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/igniterealtime/Smack/statuses/4acb0858d3f63a6e31c4b67942b96e68afbe63b2"}}}}
{"actor":{"display_login":"Flowdalic"}}