From 9fd4ea9fac1f503c82e48155fa015a6b859e481a Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 19 Jun 2024 17:21:45 -0500 Subject: [PATCH 1/3] Fix room `type` typo --- synapse/push/mailer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py index 77cc69a71f5..93a79533ed0 100644 --- a/synapse/push/mailer.py +++ b/synapse/push/mailer.py @@ -716,7 +716,7 @@ async def _make_summary_text_single_room( ) if ( create_event - and create_event.content.get("room_type") == RoomTypes.SPACE + and create_event.content.get(EventContentFields.ROOM_TYPE) == RoomTypes.SPACE ): return self.email_subjects.invite_from_person_to_space % { "person": inviter_name, From c896a9f738448568274382dea628a5982eb75b7c Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 19 Jun 2024 17:29:32 -0500 Subject: [PATCH 2/3] Add import --- synapse/push/mailer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py index 93a79533ed0..cf611bd90b8 100644 --- a/synapse/push/mailer.py +++ b/synapse/push/mailer.py @@ -28,7 +28,7 @@ from markupsafe import Markup from prometheus_client import Counter -from synapse.api.constants import EventTypes, Membership, RoomTypes +from synapse.api.constants import EventContentFields, EventTypes, Membership, RoomTypes from synapse.api.errors import StoreError from synapse.config.emailconfig import EmailSubjectConfig from synapse.events import EventBase @@ -716,7 +716,8 @@ async def _make_summary_text_single_room( ) if ( create_event - and create_event.content.get(EventContentFields.ROOM_TYPE) == RoomTypes.SPACE + and create_event.content.get(EventContentFields.ROOM_TYPE) + == RoomTypes.SPACE ): return self.email_subjects.invite_from_person_to_space % { "person": inviter_name, From 106f6692194f31c62f11131ecb0208b6b2484106 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 19 Jun 2024 17:29:37 -0500 Subject: [PATCH 3/3] Add changelog --- changelog.d/17336.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/17336.bugfix diff --git a/changelog.d/17336.bugfix b/changelog.d/17336.bugfix new file mode 100644 index 00000000000..618834302ec --- /dev/null +++ b/changelog.d/17336.bugfix @@ -0,0 +1 @@ +Fix email notification subject when invited to a space.