summary refs log tree commit diff
path: root/synapse/push/mailer.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r--synapse/push/mailer.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 9ff092e8bb..4d875dcb91 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -486,7 +486,11 @@ class Mailer:
     def add_image_message_vars(
         self, messagevars: Dict[str, Any], event: EventBase
     ) -> None:
-        messagevars["image_url"] = event.content["url"]
+        """
+        Potentially add an image URL to the message variables.
+        """
+        if "url" in event.content:
+            messagevars["image_url"] = event.content["url"]
 
     async def make_summary_text(
         self,