diff options
author | Joas Schilling <coding@schilljs.com> | 2023-02-24 07:04:07 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-02-24 07:06:16 +0100 |
commit | 4a2415b3bd302c266a64b950e492443502630c36 (patch) | |
tree | ed990401cd2e1671b851dcf8e2e53f8b2616fc6e | |
parent | 2c38275585539ce3fc416657db95341d8cb410a7 (diff) |
feat(recording): Add a shorter subject for the call recording notification
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/Notification/Notifier.php | 5 | ||||
-rw-r--r-- | tests/integration/features/bootstrap/FeatureContext.php | 7 | ||||
-rw-r--r-- | tests/integration/features/callapi/recording.feature | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 0650544cf..1eb76a152 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -345,8 +345,9 @@ class Notifier implements INotifier { ); $notification - ->setRichSubject( - $l->t('Recording for the call in {call} was uploaded to {file}.'), + ->setRichSubject($l->t('Call recording now available')) + ->setRichMessage( + $l->t('The recording for the call in {call} was uploaded to {file}.'), [ 'call' => [ 'type' => 'call', diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 91e0df3e1..602c5d1c7 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -2754,8 +2754,11 @@ class FeatureContext implements Context, SnippetAcceptingContext { } if (isset($expectedNotification['subject'])) { $data['subject'] = (string) $notification['subject']; - if (str_contains($expectedNotification['subject'], '{{TOKEN}}')) { - $data['subject'] = str_replace($notification['object_id'], '{{TOKEN}}', $data['subject']); + } + if (isset($expectedNotification['message'])) { + $data['message'] = (string) $notification['message']; + if (str_contains($expectedNotification['message'], '{{TOKEN}}')) { + $data['message'] = str_replace($notification['object_id'], '{{TOKEN}}', $data['message']); } } if (isset($expectedNotification['object_type'])) { diff --git a/tests/integration/features/callapi/recording.feature b/tests/integration/features/callapi/recording.feature index 1369f1e36..dd9dc3d2d 100644 --- a/tests/integration/features/callapi/recording.feature +++ b/tests/integration/features/callapi/recording.feature @@ -402,8 +402,8 @@ Feature: callapi/recording And user "participant1" joins room "room1" with 200 (v4) When user "participant1" store recording file "/img/join_call.ogg" in room "room1" with 200 (v1) Then user "participant1" has the following notifications - | app | object_type | object_id | subject | - | spreed | recording | room1 | Recording for the call in room1 was uploaded to /Talk/Recording/{{TOKEN}}/join_call.ogg. | + | app | object_type | object_id | subject | message | + | spreed | recording | room1 | Call recording now available | The recording for the call in room1 was uploaded to /Talk/Recording/{{TOKEN}}/join_call.ogg. | And user "participant1" is participant of the following unordered rooms (v4) | type | name | callRecording | | 2 | room1 | 0 | |