kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
405ca4145f
commit
9a7597b365
|
@ -78,8 +78,8 @@ class ActivityPub(User, Protocol):
|
|||
assert util.is_web(id), f'{id} is not a URL'
|
||||
domain = util.domain_from_link(id)
|
||||
assert domain, 'missing domain'
|
||||
assert util.domain_from_link(id) not in common.DOMAINS, \
|
||||
f'{id} is a Bridgy Fed domain'
|
||||
assert domain not in common.DOMAIN_BLOCKLIST, \
|
||||
f'{id} is a blocked domain'
|
||||
|
||||
def web_url(self):
|
||||
"""Returns this user's web URL aka web_url, eg 'https://foo.com/'."""
|
||||
|
|
2
web.py
2
web.py
|
@ -69,7 +69,7 @@ class Web(User, Protocol):
|
|||
id = self.key.id()
|
||||
assert re.match(common.DOMAIN_RE, id)
|
||||
assert id.lower() == id, f'upper case is not allowed in Web key id: {id}'
|
||||
assert id not in common.DOMAINS, f'{id} is a Bridgy Fed domain'
|
||||
assert id not in common.DOMAIN_BLOCKLIST, f'{id} is a blocked domain'
|
||||
|
||||
@classmethod
|
||||
def get_or_create(cls, id, **kwargs):
|
||||
|
|
Ładowanie…
Reference in New Issue