kopia lustrzana https://github.com/snarfed/bridgy-fed
minor log tweaks, TODO
rodzic
7818fb37fb
commit
3c3dadb524
|
|
@ -530,4 +530,4 @@ def as2_request_type():
|
|||
return as2.CONTENT_TYPE
|
||||
elif accept_type in (as2.CONTENT_TYPE_LD, as2.CONTENT_TYPE_LD_PROFILE):
|
||||
return as2.CONTENT_TYPE_LD_PROFILE
|
||||
logger.info(f'Conneg resolved {accept_type} for Accept: {accept}')
|
||||
logger.debug(f'Conneg resolved {accept_type} for Accept: {accept}')
|
||||
|
|
|
|||
|
|
@ -828,6 +828,7 @@ Welcome to Bridgy Fed! Your account will soon be bridged to {to_proto.PHRASE} at
|
|||
if self.obj and self.obj.as1:
|
||||
return util.get_url(self.obj.as1, 'image')
|
||||
|
||||
# TODO: cache in memcache
|
||||
@cachetools.cached(cachetools.TTLCache(50000, 60 * 60 * 2), # 2h expiration
|
||||
key=lambda user: user.key.id(), lock=Lock())
|
||||
def count_followers(self):
|
||||
|
|
|
|||
|
|
@ -1018,7 +1018,7 @@ class Protocol:
|
|||
if obj.type == 'follow':
|
||||
if proto := Protocol.for_bridgy_subdomain(inner_obj_id):
|
||||
# follow of one of our protocol bot users; enable that protocol.
|
||||
# foll through so that we send an accept.
|
||||
# fall through so that we send an accept.
|
||||
from_user.enable_protocol(proto)
|
||||
proto.bot_follow(from_user)
|
||||
|
||||
|
|
@ -1370,7 +1370,7 @@ class Protocol:
|
|||
logger.info(f"Can't determine protocol for {id}")
|
||||
continue
|
||||
elif target_proto.is_blocklisted(id):
|
||||
logger.info(f'{id} is blocklisted')
|
||||
logger.debug(f'{id} is blocklisted')
|
||||
continue
|
||||
|
||||
orig_obj = target_proto.load(id, raise_=False)
|
||||
|
|
|
|||
2
web.py
2
web.py
|
|
@ -81,7 +81,7 @@ def is_valid_domain(domain, allow_internal=True):
|
|||
return False
|
||||
|
||||
if Web.is_blocklisted(domain, allow_internal=allow_internal):
|
||||
# logger.info(f'{domain} is blocklisted')
|
||||
# logger.debug(f'{domain} is blocklisted')
|
||||
return False
|
||||
|
||||
tld = domain.split('.')[-1]
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue