sourcecred / widgets

Other
2 stars 3 forks source link

Support Discourse avatars #37

Open Beanow opened 4 years ago

Beanow commented 4 years ago

Part of the next SourceCred release will be to support Discourse forums. It's available in the current master, so for the first widgets release to be compatible with that, we should implement Discourse avatars.

Depends on: #32

Some pointers or a proof of concept to fetch Discourse avatars at all would be great :D

Beanow commented 4 years ago

Interesting comment from @decentralion at https://github.com/sourcecred/widgets/pull/33#discussion_r331612663

I'm noting that this code only works for GitHub identities, so it will break with the new scores format (and inclusion of SC and Discourse identities), yes?

Also: this is actually a reason that the scores format with address parts is better than just including aliases, as the address parts for the Discourse address include the server url, while the alias wouldn't. So with the address parts, we could infer the right avatar url for Discourse users.

As a workaround until sourcecred identities support avatars (see https://github.com/sourcecred/sourcecred/issues/1396), the discourse addresses can be parsed to work out the URL from which to fetch avatars and link when clicking the avatar from the SVG.