Fix attachment display and tweak actor lookup
This commit is contained in:
parent
bc7a8db640
commit
afa33b4e7c
3 changed files with 46 additions and 4 deletions
|
@ -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:]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue