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

feat: add server avatar #146

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

Conversation

swarley
Copy link
Member

@swarley swarley commented Mar 28, 2022

Summary

Add server avatar support.

Closes #145


Added

  • MemberAttributes#avatar_id
  • Member#avatar

Changed

  • MemberAttributes#avatar_id no longer delegates to User directly
  • Member#avatar no longer delegated to User directly

Deprecated

Removed

Fixed

Copy link
Member

@Daniel-Worrall Daniel-Worrall left a comment

Choose a reason for hiding this comment

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

All good, couple changes to include/discuss

@@ -294,6 +302,13 @@ def display_name
nickname || username
end

# (See User#avatar_url)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# (See User#avatar_url)
@see User#avatar_url

@@ -294,6 +302,13 @@ def display_name
nickname || username
end

# (See User#avatar_url)
def avatar_url(format = nil)
Copy link
Member

Choose a reason for hiding this comment

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

Include a parameter to get the global avatar_url, regardless of a Member's avatar_id, since the Member doesn't provide easy access to the underlying @user, and this overwrites one of the methods.

Also, would be more appropriate on MemberAttributes for consistency (#avatar_url is on UserAttributes) before the v4 rework

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.

Per server avatars
2 participants