Commit Graph

62 Commits

Author SHA1 Message Date
Pradeep Murugesan
488ae1abad turned off email notification for the status DND (#12502)
* turned off email notification for the status DND

* extracted the userAllows email logic as a separate function

* removed the unused function
2019-10-08 09:57:20 +02:00
Joram Wilander
c91bcd130d MM-18126 Respect show full name config setting in push and email notifications (#11996)
* Respect show full name config setting in push and email notifications

* Style fix
2019-09-03 10:33:49 -04:00
Miguel Alatzar
0cd3663d91 [MM-17300] Do not add empty string as a keyword key (#11961)
* Do not add empty string as a keyword key

* Add unit test

* User assert lib over t.Fatal
2019-08-29 17:49:31 -04:00
Elias Nahum
24e0d6f00d Add @ prefix for sender username in push notifications (#11934)
* Add @ prefix for sender username in push notifications

* de-duplicating code
2019-08-23 09:46:43 -04:00
Harrison Healey
eba8794540 MM-17071 Extract and add tests for handling of out of channel mentions (#11788)
* MM-17071 Extract and add tests for handling of out of channel mentions

* Rename checkForOutOfChannelMentions back to sendOutOfChannelMentions

* Log errors returned by sendOutOfChannelMentions
2019-08-09 09:27:28 -04:00
Gabe Jackson
48e06e9bc4 Fix issue with setting mention count (#11610)
This change does the following:
 - Fixes a bug where mention counts could be set incorrectly for
   users in the database.
 - Updates the original notification unit test to check for more
   possible notification issues.
 - Adds a new unit test that performs mention count checking to
   prevent a regression to this fix.
2019-07-11 18:35:02 -04:00
Giorgos Christos Dimitriou
bbdd6927de Ongoing changes to notification.go (#11047)
* Change the functions that are used only by `notification.go` from public
to private

* Split getExplicitMentions() into smaller functions.
- addMentionedUsers
- checkForMention
- isKeywordMultibyte
- processText

along with their tests.

* Merge with master
Fix wording on isKeywordMultibyte() function comment
2019-06-15 15:44:11 +02:00
Elias Nahum
be935cee4e Revert "MM-10867 Split GetExplicitMentions function to several smaller ones (#10492)" (#10895)
This reverts commit fb01d37846.
2019-05-20 16:37:55 -03:00
Giorgos Christos Dimitriou
fb01d37846 MM-10867 Split GetExplicitMentions function to several smaller ones (#10492) 2019-05-17 16:23:56 +02:00
Elias Nahum
e6be06b3fc MM-14289 & MM-14884 Push notification acknowledge id and include sender name (#10736)
* MM-14289 Add Push notification acknowledge identifier and store tracing logs

* MM-14884 include SenderName property in Push Notifications

* Remove @ sign from channel Name in push notifications

* Fix i18n

* Fix push notification model

* fix TestPostNotificationGetChannelName

* Remove colon from model constant

* Fix Notification Registry tests

* Make postId optional for clear notifications

* Update http status when service is not available

Co-Authored-By: enahum <nahumhbl@gmail.com>
2019-04-30 18:15:29 -04:00
Martin Kraft
84a59ddb39 MM-14417: Messaging for mentions of users who are not in associated channel groups. (#10594)
* MM-14417: Adds support for out-of-channel notifications of users who are not in associated groups of group-constrained channels.

* MM-14417: Fix for mobile backwards compatibility.
2019-04-17 10:44:45 -04:00
Yusuke Nemoto
74c2759117 Trigger mentions for keyword including multibyte characters in sentences (#10262) 2019-03-08 15:44:25 +08:00
Shreyansh Chouhan
39ceaa3e86 [MM-13833] Configured unit tests to log through t.Log (#10272)
* Rerouted the unit test logs through t.Log

* resolving merge confilvts

* Update testing.go

* Update helper_test.go

* Added godocs for NewTestingLogger

* Added go docs for NewTestingLogger

* Resolving conflicts
2019-02-14 13:52:11 -04:00
Jesús Espino
5a37a606fc MM-12941: Fixed problem with not-in-channel mentions users (#9974) 2018-12-11 14:01:38 +01:00
Carlos Tadeu Panato Junior
1bcf08aa4b Refactor Get/Create Direct Channel into one function (#9867)
* refactor GetDirectChannel and CreateDirectChannel in one function

* remove CreateDirectChannel plugin api and update GetDirectChannel and GetGroupChannel plugin api

* update tests
2018-11-28 18:01:49 +01:00
Tsilavina Razafinirina
4aca95fff9 [MM-8404] Channel notification setting for disabling channel mentions (#9777)
* Channel notification setting for disabling channel mentions

* Updates unit tests (#MM-8404)

* Adds constants (#MM-8404)

* Refactors if statement and adds unit test (#MM-8404)

* Moves ignore_channel_mentions_notify_prop constant to channel model (#MM8484)
2018-11-13 19:25:57 -05:00
Harrison Healey
6c2a5555b8 MM-11700 Clean up handling of user display names for notifications (#9343)
* MM-11700 Clean up handling of user display names for notifications
2018-09-18 00:20:12 +05:30
Jesús Espino
8cc4f27f7c MM-11529: Allow to Leave an archived channel from the API (#9204)
* MM-11529: Allow to Leave an archived channel from the API

* Remove the restriction to remove user from archive channel to yourself
2018-08-03 10:44:32 +02:00
Jesús Espino
08e54ed824 Split notifications file into different files (#9164) 2018-07-28 19:20:44 +02:00
Chris Duarte
62c64594cc Add localized timestamp support for email notification (#8674)
* Add localized timestamp support for email notification

* Move localTime logic over to getFormattedPostTime
2018-07-13 14:10:34 -04:00
Pradeep Murugesan
06abe98ba9 GH-8964 enable notification for text and preText fields in Attachments (#9069) 2018-07-11 10:11:36 -04:00
Harrison Healey
bca7339e4c MM-10597 Improved handling of punctuation around notifications (#8901) 2018-06-05 19:34:21 +02:00
Elias Nahum
e39f5f46f3 Push notification styling improvements (#8818)
* Push notification styling improvements

* Fix unit tests
2018-05-30 10:11:19 -07:00
Ugurcan Turkdogan
02f8c18f40 Update email notification subject line and contents for Group Messages (#8689)
Reordered notification strings

MM-10335 Changed uppercase CHANNEL to Lowercase Channel, added @ sign before username on notifications

Added @ sign in front of username in all email notifications.
Capitalized Direct Message and Group Message in email notifications.
Fixed the issue with long group message names.

Removed executable bit
2018-05-15 16:43:59 -04:00
Saturnino Abril
4ce37601a1 add notification when @user, @here, @all and @channel has colon ":" at the end (#8760) 2018-05-11 12:57:20 -04:00
Jesús Espino
ffb834ec3c Fix TestSendNotifications test (#8712) 2018-05-03 09:40:54 -04:00
Joram Wilander
514033f14c Fix panics caused by race in notification code (#8652) 2018-04-19 11:21:33 -03:00
Harrison Healey
2d0fef4d94 MM-10036 Ensured correct handling of capitalized special mentions (#8607) 2018-04-11 10:33:20 -04:00
Saturnino Abril
e16217166d fix out of channel mentions for mentioned word with valid punctuations (#8585) 2018-04-06 09:41:45 -04:00
Harrison Healey
088f76ad6e MM-9868 Fixed mentioning users when followed by multiple periods (#8548)
* MM-9868 Fixed mentioning users when followed by multiple periods

* Added additional unit test

* Added comment to clarify test purpose
2018-04-02 12:40:28 -04:00
Christian Claus
257f748732 [PLT-4340] Channel Mute and "/mute" command #7617 (#7713)
* Add command and store changes to allow mute toggling

* Change channel muting to use ChannelMember notification structure

* Suppress email and push notifications for a muted channel

* Make i18n keys issue-compliant

* Add notification-cache handling for channel-muting

* Add channel handle for channel-muting slash-command

* Add unit test for mute command

* Merge branch 'master' into PLT-4340

# Conflicts:
#	app/notification.go

* Fix issue that command_mute responses will be overwritten

* Fix i18n key for channel muting

* Apply new Provider Interface to MuteCommand

* Migrate mute notification property to mark_unread

PLT-4340

* Make some i18n improvements for command_mute

PLT-4340

* Remove de.json translations

* Prevent push notifications when channel is muted

* Treat Group messages like Direct messages

* Fix unit test

* Send WS event when the channel member notify props changed
2018-03-28 07:02:04 +03:00
Joram Wilander
1b3808f3ec Fix push notification content for file only messages (#8346) 2018-02-22 09:00:13 -05:00
Derrick Anderson
88d693a950 Merge branch 'release-4.7' into icu753 2018-02-14 00:53:04 -05:00
Stephen Kiers
08c21f7519 Added more tests and simplified code 2018-02-13 10:49:48 -07:00
Harrison Healey
3fef21e350 ICU-753 Added unit tests for messages with only push notifications 2018-02-13 09:57:23 -05:00
Harrison Healey
c1b49f8b77 ICU-753 Added unit tests for push notification contents 2018-02-13 09:57:23 -05:00
Stephen Kiers
bdf478c75b Added another test 2018-02-12 20:50:20 -07:00
Stephen Kiers
0cbba46018 Fixes ICU-764 2018-02-12 16:30:03 -07:00
Chris
3dad632043 use markdown parsing to identify mentions (#8139) 2018-01-23 14:48:20 -05:00
Siyuan Liu
a37d53c732 PLT-8350 "mention" when channel user count equals to max allowed num (#7976) 2017-12-15 14:16:31 -06:00
Chris
10c5a927cb more global config ref cleanup (#7802) 2017-11-09 14:46:20 -06:00
Carlos Tadeu Panato Junior
63df41b911 fix push notification when user status is in DND (#7731) 2017-10-30 08:15:01 -04:00
Saturnino Abril
f632232862 [PLT-7701] Fix emoji names that trigger mention (#7663)
* fix emoji names that trigger mention

* remove regex and rearrange based on comment

* make ":@here:" to not trigger a mention
2017-10-25 22:11:20 +08:00
Chris
07777f5ff9 Fix races / finally remove global app for good (#7570)
* finally remove global app for good

* test compilation fixes

* fix races

* fix deadlock

* wake up write pump so it doesn't take forever to clean up
2017-10-04 13:09:41 -07:00
Harrison Healey
2a6cd44f23 PLT-7509 Stopped processing special mentions for change of header/purpose messages (#7410) 2017-09-15 08:37:29 -04:00
Chris
b066b6df13 Remove global app references (#7433)
* remove global app references

* test fix

* fix api4 test compilation
2017-09-12 09:19:52 -05:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Chris
1adfd0e9be app type transition (#7167) 2017-09-06 17:12:54 -05:00
Harrison Healey
575864c917 PLT-7474 Stopped requiring confirmation for mentions in code blocks (#7375)
* PLT-7474 Stopped requiring confirmation for mentions in code blocks

* Stopped mentioning people from code blocks using ~~~
2017-09-06 00:39:07 +08:00
Harrison Healey
98bb4c31a1 PLT-7473 Ignore text surrounded by multiple backquotes when parsing mentions (#7347) 2017-09-04 21:31:20 +08:00