mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 16:39:24 -05:00
Fix store_url_cache using bytes
This commit is contained in:
parent
8bc529c04d
commit
ca3e01e50d
@ -270,7 +270,7 @@ class PreviewUrlResource(DirectServeResource):
|
|||||||
|
|
||||||
logger.debug("Calculated OG for %s as %s" % (url, og))
|
logger.debug("Calculated OG for %s as %s" % (url, og))
|
||||||
|
|
||||||
jsonog = json.dumps(og).encode("utf8")
|
jsonog = json.dumps(og)
|
||||||
|
|
||||||
# store OG in history-aware DB cache
|
# store OG in history-aware DB cache
|
||||||
yield self.store.store_url_cache(
|
yield self.store.store_url_cache(
|
||||||
@ -283,7 +283,7 @@ class PreviewUrlResource(DirectServeResource):
|
|||||||
media_info["created_ts"],
|
media_info["created_ts"],
|
||||||
)
|
)
|
||||||
|
|
||||||
return jsonog
|
return jsonog.encode("utf8")
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _download_url(self, url, user):
|
def _download_url(self, url, user):
|
||||||
|
Loading…
Reference in New Issue
Block a user