Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

scullingworth
Copy link
Contributor

No description provided.

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';

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks!

Copy link

@neil-power-hs neil-power-hs left a 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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants