{"action":"created","issue":{"url":"https://api.github.com/repos/qTox/qTox/issues/3868","repository_url":"https://api.github.com/repos/qTox/qTox","labels_url":"https://api.github.com/repos/qTox/qTox/issues/3868/labels{/name}","comments_url":"https://api.github.com/repos/qTox/qTox/issues/3868/comments","events_url":"https://api.github.com/repos/qTox/qTox/issues/3868/events","html_url":"https://github.com/qTox/qTox/pull/3868","id":188138094,"number":3868,"title":"feat(toxid): Added correct checksum validation.","user":{"login":"Diadlo","id":6306608,"avatar_url":"https://avatars.githubusercontent.com/u/6306608?v=3","gravatar_id":"","url":"https://api.github.com/users/Diadlo","html_url":"https://github.com/Diadlo","followers_url":"https://api.github.com/users/Diadlo/followers","following_url":"https://api.github.com/users/Diadlo/following{/other_user}","gists_url":"https://api.github.com/users/Diadlo/gists{/gist_id}","starred_url":"https://api.github.com/users/Diadlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Diadlo/subscriptions","organizations_url":"https://api.github.com/users/Diadlo/orgs","repos_url":"https://api.github.com/users/Diadlo/repos","events_url":"https://api.github.com/users/Diadlo/events{/privacy}","received_events_url":"https://api.github.com/users/Diadlo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-11-09T00:06:17Z","updated_at":"2016-12-08T13:12:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/qTox/qTox/pulls/3868","html_url":"https://github.com/qTox/qTox/pull/3868","diff_url":"https://github.com/qTox/qTox/pull/3868.diff","patch_url":"https://github.com/qTox/qTox/pull/3868.patch"},"body":"Fix #3837\r\n\r\nImplementation is taken from the [toxcore](https://github.com/TokTok/c-toxcore/blob/master/toxcore/Messenger.c#L123,L138)\n\n<!-- Reviewable:start -->\n\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/qtox/qtox/3868)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/qTox/qTox/issues/comments/265736611","html_url":"https://github.com/qTox/qTox/pull/3868#issuecomment-265736611","issue_url":"https://api.github.com/repos/qTox/qTox/issues/3868","id":265736611,"user":{"login":"Diadlo","id":6306608,"avatar_url":"https://avatars.githubusercontent.com/u/6306608?v=3","gravatar_id":"","url":"https://api.github.com/users/Diadlo","html_url":"https://github.com/Diadlo","followers_url":"https://api.github.com/users/Diadlo/followers","following_url":"https://api.github.com/users/Diadlo/following{/other_user}","gists_url":"https://api.github.com/users/Diadlo/gists{/gist_id}","starred_url":"https://api.github.com/users/Diadlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Diadlo/subscriptions","organizations_url":"https://api.github.com/users/Diadlo/orgs","repos_url":"https://api.github.com/users/Diadlo/repos","events_url":"https://api.github.com/users/Diadlo/events{/privacy}","received_events_url":"https://api.github.com/users/Diadlo/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T13:12:42Z","updated_at":"2016-12-08T13:12:42Z","body":"\n\n\n\nReview status: 0 of 3 files reviewed at latest revision, 4 unresolved discussions.\n\n---\n\n*[src/core/toxid.h, line 39 at r3](https://reviewable.io:443/reviews/qtox/qtox/3868#-KYT6_X6Thf_W56Dr8rt:-KYTBGvjrE6iyLkL5Vgi:bmw34wu) ([raw file](https://github.com/qtox/qtox/blob/2213dd99e822d9f89ecfb61811b722a7ed1b86d0/src/core/toxid.h#L39)):*\n<details><summary><i>Previously, antis81 (Nils Fenner) wrote…</i></summary><blockquote>\n\nIf you want it this way, then create three static methods:\n\n1. static inline bool ToxId::isLengthValid(const QString& s) {…}\n2. static inline bool ToxId::isHexStr(const QString& s) {…}\n3. static inline bool ToxId::isChecksumValid(const QString& s) {…}\n\nAnd then create a fourth, which validates all three like I wrote in the validator class above (which is basically the same thing, but works better across threads):\n\n4. static inline ToxId::isValid(const QString& s)  { return isLengthValid(string) && isHexStr(const QString& s) && isChecksumValid(const QString& s); }\n\nIn opposite to a \"probably\" - this is a safe validation and is clear in any case.\n</blockquote></details>\n\nI think `isProbablyDoingSomethingOrNotMaybeWhoCares` will be too long, so not :P \nAlso, I don't think, that this methods should be a part of `ToxId` class\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/qtox/qtox/3868)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"Diadlo"}}