From b7d045844c4d00d8268da50f2388be1d12c91829 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Sat, 30 Jan 2016 13:44:39 -0500 Subject: Added serverside check for a post that @mentions someone who isn't in the channel --- i18n/en.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'i18n/en.json') diff --git a/i18n/en.json b/i18n/en.json index 2d86e1ee5..e620a1f0d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -683,6 +683,18 @@ "id": "api.post.delete_post.permissions.app_error", "translation": "You do not have the appropriate permissions" }, + { + "id": "api.post.get_out_of_channel_mentions.retrieve_members.error", + "translation": "Failed to get channel members channel_id=%v err=%v" + }, + { + "id": "api.post.get_out_of_channel_mentions.retrieve_profiles.error", + "translation": "Failed to retrieve user profiles team_id=%v, err=%v" + }, + { + "id": "api.post.get_out_of_channel_mentions.regex.error", + "translation": "Failed to compile @mention regex user_id=%v, err=%v" + }, { "id": "api.post.get_post.permissions.app_error", "translation": "You do not have the appropriate permissions" -- cgit v1.2.3-1-g7c22 From fcb92fa1b53a2b67323a881e7cb03965d3ec24d1 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Tue, 2 Feb 2016 10:52:18 -0500 Subject: Added ephemeral messages sent when a user mentions someone not in the channel --- i18n/en.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'i18n/en.json') diff --git a/i18n/en.json b/i18n/en.json index e620a1f0d..8ffbc8b14 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -655,6 +655,14 @@ "id": "api.oauth.revoke_access_token.get.app_error", "translation": "Error getting access token from DB before deletion" }, + { + "id": "api.post.check_for_out_of_channel_mentions.message.one", + "translation": "{{.Username}} was mentioned, but they do not belong to this channel." + }, + { + "id": "api.post.check_for_out_of_channel_mentions.message.multiple", + "translation": "{{.Usernames}} and {{.LastUsername}} were mentioned, but they do not belong to this channel." + }, { "id": "api.post.create_post.bad_filename.error", "translation": "Bad filename discarded, filename=%v" @@ -3459,4 +3467,4 @@ "id": "web.watcher_fail.error", "translation": "Failed to add directory to watcher %v" } -] \ No newline at end of file +] -- cgit v1.2.3-1-g7c22 From 994358c31a93296a225f7d34942bbedfeac025c4 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Wed, 3 Feb 2016 10:56:47 -0500 Subject: Reworked the code for sending notifications and checking for out of channel mentions to share some data --- i18n/en.json | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'i18n/en.json') diff --git a/i18n/en.json b/i18n/en.json index 8ffbc8b14..12d53022e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -691,14 +691,6 @@ "id": "api.post.delete_post.permissions.app_error", "translation": "You do not have the appropriate permissions" }, - { - "id": "api.post.get_out_of_channel_mentions.retrieve_members.error", - "translation": "Failed to get channel members channel_id=%v err=%v" - }, - { - "id": "api.post.get_out_of_channel_mentions.retrieve_profiles.error", - "translation": "Failed to retrieve user profiles team_id=%v, err=%v" - }, { "id": "api.post.get_out_of_channel_mentions.regex.error", "translation": "Failed to compile @mention regex user_id=%v, err=%v" @@ -711,6 +703,14 @@ "id": "api.post.handle_post_events_and_forget.channel.error", "translation": "Encountered error getting channel, channel_id=%s, err=%v" }, + { + "id": "api.post.handle_post_events_and_forget.members.error", + "translation": "Failed to get channel members channel_id=%v err=%v" + }, + { + "id": "api.post.handle_post_events_and_forget.profiles.error", + "translation": "Failed to retrieve user profiles team_id=%v, err=%v" + }, { "id": "api.post.handle_post_events_and_forget.team.error", "translation": "Encountered error getting team, team_id=%s, err=%v" @@ -751,10 +751,6 @@ "id": "api.post.make_direct_channel_visible.update_pref.error", "translation": "Failed to update direct channel preference user_id=%v other_user_id=%v err=%v" }, - { - "id": "api.post.send_notifications_and_forget.members.error", - "translation": "Failed to get channel members channel_id=%v err=%v" - }, { "id": "api.post.send_notifications_and_forget.mention_body", "translation": "You have one new mention." @@ -787,10 +783,6 @@ "id": "api.post.send_notifications_and_forget.push_notification.error", "translation": "Failed to send push notificationid=%v, err=%v" }, - { - "id": "api.post.send_notifications_and_forget.retrive_profiles.error", - "translation": "Failed to retrieve user profiles team_id=%v, err=%v" - }, { "id": "api.post.send_notifications_and_forget.send.error", "translation": "Failed to send mention email successfully email=%v err=%v" -- cgit v1.2.3-1-g7c22