-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add WebFinger / ActivityPub avatar provider
This patch introduces a new avatar provider based on the changes from the previous commits. The WebFinger / ActivityPub provider ("webfinger" internally) loosely interprets the avatar field in a user as an RFC 7565 acct URI, the library used also allows only specifiying a domain name though. Based on this it will contact the host and query the WebFinger endpoint. If the WebFinger response contains an avatar relation, the link contained in that relation will used. Only some fediverse software supports this however, as such we also implement a tiny bit of ActivityPub and directly query the user using its "application/activity+json" relation. Given a Mastodon url (and optionally an access token), mete can also use the Mastodon client api to resolve the actor returned by WebFinger, which is generally more reliable than speaking ActivityPub directly, as requests can be signed by the Mastodon server. The results of these lookups will be cached for one day and can be invalidated by updating the user from the UI.
- Loading branch information
1 parent
aab3e66
commit e0c9078
Showing
10 changed files
with
128 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
.inner-header | ||
%h6= user.name | ||
.card-body | ||
= gravatar(user) | ||
= avatar(user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters