Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve notification content #4662

Merged
merged 21 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8c2ede5
Add notice message type.
pixlwave Aug 2, 2021
2c39bbb
Always use a message event's body instead of "Message".
pixlwave Aug 3, 2021
a5abb90
Add fallback notification for reactions. Add fallback notifications f…
pixlwave Aug 3, 2021
e13ee34
Use the body text "Notification" instead of message as the event may …
pixlwave Aug 4, 2021
795d2db
Use the notification fallback content when an event couldn't be decry…
pixlwave Aug 4, 2021
8af4b53
Strip the original message from reply notifications.
pixlwave Aug 4, 2021
4a22bd1
Move strings.
pixlwave Aug 4, 2021
e41ce31
Add notification body tweaks for video, audio and file messages.
pixlwave Aug 4, 2021
420f20c
Add voice message notification body.
pixlwave Aug 4, 2021
ee059e2
Update CHANGES.rst.
pixlwave Aug 4, 2021
0acbb64
Revert "Update CHANGES.rst."
pixlwave Aug 10, 2021
538429e
Merge branch 'develop' into doug/4132_improve_notification_content
pixlwave Aug 10, 2021
4a26465
Add changelog entries.
pixlwave Aug 10, 2021
dfa4c90
Fix localisation key.
pixlwave Aug 10, 2021
5e8da21
Merge branch 'develop' into doug/4132_improve_notification_content
pixlwave Aug 11, 2021
730c7f9
Update the value of notificationBodyLocalizationKey to "NOTIFICATION".
pixlwave Aug 12, 2021
0014b94
Merge branch 'develop' into doug/4132_improve_notification_content
pixlwave Aug 17, 2021
8773d77
Update strings from feedback.
pixlwave Aug 17, 2021
8a6fd69
Add reaction content to notifications when available.
pixlwave Aug 17, 2021
ed8c2ab
Add a few extra comments.
pixlwave Aug 17, 2021
24ff73b
Update from feedback.
pixlwave Aug 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Config/CommonConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class CommonConfiguration: NSObject, Configurable {
// Enable lazy loading
settings.syncWithLazyLoadOfRoomMembers = true

// Customize the default notification content
settings.notificationBodyLocalizationKey = "NOTIFICATION"

settings.messageDetailsAllowSharing = BuildSettings.messageDetailsAllowShare
settings.messageDetailsAllowSaving = BuildSettings.messageDetailsAllowSave
settings.messageDetailsAllowCopyingMedia = BuildSettings.messageDetailsAllowCopyMedia
Expand Down
55 changes: 51 additions & 4 deletions Riot/Assets/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,21 @@
limitations under the License.
*/

/** General **/

"NOTIFICATION" = "Notification";

/** Titles **/

/* Message title for a specific person in a named room */
"MSG_FROM_USER_IN_ROOM_TITLE" = "%@ in %@";

/* New message reply from a specific person, not referencing a room. */
"REPLY_FROM_USER_TITLE" = "%@ replied";

/* New message reply from a specific person in a named room. */
"REPLY_FROM_USER_IN_ROOM_TITLE" = "%@ replied in %@";

/** Single, end-to-end encrypted messages (ie. we don't know what they say) */

/* New message from a specific person, not referencing a room */
Expand All @@ -39,14 +51,26 @@
/* New action message from a specific person in a named room. */
"ACTION_FROM_USER_IN_ROOM" = "%@: * %@ %@";

/** Image Messages **/
/** Media Messages **/

/* New action message from a specific person, not referencing a room. */
"IMAGE_FROM_USER" = "%@ sent a picture %@";
/* New image message from a specific person, not referencing a room. */
"PICTURE_FROM_USER" = "%@ sent a picture";

/* New action message from a specific person in a named room. */
/* New image message from a specific person in a named room. */
"IMAGE_FROM_USER_IN_ROOM" = "%@ posted a picture %@ in %@";

/* New video message from a specific person, not referencing a room. */
"VIDEO_FROM_USER" = "%@ sent a video";

/* New audio message from a specific person, not referencing a room. */
"AUDIO_FROM_USER" = "%@ sent an audio file %@";

/* New voice message from a specific person, not referencing a room. */
"VOICE_MESSAGE_FROM_USER" = "%@ sent a voice message";

/* New file message from a specific person, not referencing a room. */
"FILE_FROM_USER" = "%@ sent a file %@";

/* A single unread message in a room */
"SINGLE_UNREAD_IN_ROOM" = "You received a message in %@";

Expand All @@ -67,6 +91,7 @@
/* New message indicator on a room */
"MESSAGE_IN_X" = "Message in %@";

/* New message with hidden content due to PIN enabled */
"MESSAGE_PROTECTED" = "New Message";

/** Coalesced messages **/
Expand All @@ -92,6 +117,14 @@
/* Look, stuff's happened, alright? Just open the app. */
"MSGS_IN_TWO_PLUS_ROOMS" = "%@ new messages in %@, %@ and others";

/** Reactions **/

/* A user has reacted to a message, including the reaction e.g. "Alice reacted 👍". */
"REACTION_FROM_USER" = "%@ reacted %@";

/* A user has reacted to a message, but the reaction content is unknown */
"GENERIC_REACTION_FROM_USER" = "%@ sent a reaction";

/** Invites **/

/* A user has invited you to a chat */
Expand All @@ -103,6 +136,20 @@
/* A user has invited you to a named room */
"USER_INVITE_TO_NAMED_ROOM" = "%@ has invited you to %@";

/** Membership Updates **/

/* A user has change their name to a new name */
"USER_UPDATED_DISPLAYNAME" = "%@ changed their name to %@";

/* A user has change their name to a new name which we don't know */
"GENERIC_USER_UPDATED_DISPLAYNAME" = "%@ changed their name";

/* A user has change their avatar */
"USER_UPDATED_AVATAR" = "%@ changed their avatar";

/* A user's membership has updated in an unknown way */
"USER_MEMBERSHIP_UPDATED" = "%@ updated their profile";

/** Calls **/

/* Incoming one-to-one voice call */
Expand Down
Loading