-
Notifications
You must be signed in to change notification settings - Fork 13
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
Gracefully handle empty or missing profiles #15
base: master
Are you sure you want to change the base?
Conversation
assets/modal.js
Outdated
@@ -12,30 +12,34 @@ function populateMessage(data) { | |||
appendTextToClass('hs_jsonDump', prettyJSONData); | |||
|
|||
// finds network-specific information | |||
var avatarURL = 'https://hootsuite.com/dist/images/logos/hootsuite/owly.png'; | |||
var displayName = 'Hootsuite'; | |||
var avatarURL = 'https://d12qyuqyvqjkw5.cloudfront.net/v2/images/dashboard/avatars/member-default-100.d3442c37.svg'; |
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.
I think that you can use the friendly url for this resource, I can't recall what it is at the moment but I will try to look it up.
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.
nice, thanks!
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.
You can use this url instead: http://static.hootsuite.com/v2/images/dashboard/avatars/member-default-100.d3442c37.svg
static.hootsuite.com maps to that cloudfront url.
profileURL = 'https://www.youtube.com/channel/' + data.profile.userid; | ||
break; | ||
if (typeof data.profile === "undefined") { | ||
// skip if profile is empty |
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.
Do we want to have an explanation why this profile would be empty. If an external (or internal) dev sees this, they won't know why it's being skipped and not supported.
No description provided.