Fix attachment display and tweak actor lookup
This commit is contained in:
@@ -273,9 +273,6 @@ _FILE_URL_CACHE = LRUCache(4096)
|
||||
|
||||
|
||||
def _get_file_url(url, size, kind) -> str:
|
||||
if url.startswith(BASE_URL):
|
||||
return url
|
||||
|
||||
k = (url, size, kind)
|
||||
cached = _FILE_URL_CACHE.get(k)
|
||||
if cached:
|
||||
@@ -288,6 +285,9 @@ def _get_file_url(url, size, kind) -> str:
|
||||
return out
|
||||
|
||||
_logger.error(f"cache not available for {url}/{size}/{kind}")
|
||||
if url.startswith(BASE_URL):
|
||||
return url
|
||||
|
||||
p = urlparse(url)
|
||||
return f"/p/{p.scheme}" + p._replace(scheme="").geturl()[1:]
|
||||
|
||||
|
Reference in New Issue
Block a user