-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change Mastodon tree for social avatar #3504
Conversation
6598f26
to
434de78
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #3504 +/- ##
==========================================
- Coverage 1.81% 0.00% -1.82%
- Complexity 272 275 +3
==========================================
Files 113 25 -88
Lines 6123 830 -5293
Branches 1480 0 -1480
==========================================
- Hits 111 0 -111
+ Misses 5896 830 -5066
+ Partials 116 0 -116
☔ View full report in Codecov by Sentry. |
$result = $this->httpClient->get($profileUrl, ['headers' => ['Accept' => 'application/json']]); | ||
$jsonResult = json_decode($result->getBody()); | ||
return $jsonResult->avatar; | ||
return $jsonResult->icon->url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: deserialize into an associative array and use the null coalesce operator to not cause errors with missing keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good comment. I modfied it as follows:
$jsonResult = json_decode($result->getBody(), true); |
434de78
to
068c135
Compare
896d1d9
to
980d581
Compare
7d3a2cb
to
6712b78
Compare
6712b78
to
c23fb21
Compare
@ChristophWurst what is missing in order to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works. Code looks good to me.
Thanks for the PR :)
PS: It seems that the committer and signed-off names are diverging. @call-me-matt Could you please fix it so that DCO passes? |
Signed-off-by: call-me-matt <[email protected]>
c23fb21
to
115b1b4
Compare
Mastodon avatars seem to be at a different location in the json tree. This fix adapts to the change.