-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ActivityPub.convert: omit acct: URIs
- Loading branch information
Showing
2 changed files
with
8 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -1852,6 +1852,13 @@ def test_postprocess_as2_actor_url_attachments(self): | |
'value': '<a rel="me" href="https://two"><span class="invisible">https://</span>two</a>', | ||
}], got['attachment']) | ||
|
||
def test_postprocess_as2_actor_strips_acct_url(self): | ||
self.assert_equals('http://localhost/r/http://user.com/', | ||
postprocess_as2_actor(as2.from_as1({ | ||
'objectType': 'person', | ||
'urls': ['http://user.com/', 'acct:foo@bar'], | ||
}), user=self.user)['url']) | ||
|
||
def test_postprocess_as2_actor_preserves_preferredUsername(self): | ||
# preferredUsername stays y.z despite user's username. since Mastodon | ||
# queries Webfinger for [email protected] | ||
|