Skip to content

Commit 9700fb9

Browse files
Update body in-place
1 parent 08b0d20 commit 9700fb9

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

app/backend/src/couchers/notifications/locales/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@
290290
"title": "New host request from {{user}}",
291291
"ios_title": "{{user}}",
292292
"ios_subtitle": "New Host Request",
293-
"body2_one": "{{user}} wants to stay from {{start_date}} for {{count}} night.",
294-
"body2_other": "{{user}} wants to stay from {{start_date}} for {{count}} nights."
293+
"body_one": "{{user}} wants to stay from {{start_date}} for {{count}} night.",
294+
"body_other": "{{user}} wants to stay from {{start_date}} for {{count}} nights."
295295
}
296296
},
297297
"message": {

app/backend/src/couchers/notifications/render_push.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ def _get_content(
151151
ios_title: str | None = None,
152152
ios_subtitle: str | None = None,
153153
body: str | None = None,
154-
body_key: str | None = None,
155154
substitutions: dict[str, str | int] | None = None,
156155
icon_user: api_pb2.User | None = None,
157156
action_url: str | None = None,
@@ -175,7 +174,7 @@ def _get_content(
175174
# Not all notifications have subtitles
176175
pass
177176
if body is None:
178-
body = _get_string(string_group, body_key or "body", loc_context, substitutions)
177+
body = _get_string(string_group, "body", loc_context, substitutions)
179178

180179
icon_url = _avatar_url_or_default(icon_user) if icon_user else None
181180

@@ -514,7 +513,6 @@ def _render_host_request__create(
514513
return _get_content(
515514
NotificationTopicAction.host_request__create,
516515
loc_context,
517-
body_key="body2",
518516
substitutions={
519517
"user": data.surfer.name,
520518
"start_date": loc_context.localize_date_from_iso(data.host_request.from_date),

0 commit comments

Comments
 (0)