From 89e74abb504b1a285571b6c680f484b853d06220 Mon Sep 17 00:00:00 2001 From: Aditya Bhardwaj Date: Wed, 17 Jul 2019 18:08:35 +0530 Subject: [PATCH] Service Accounts Notifications fixed (#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [NEW] Service Account Admin Settings and Configuration files added * [NEW] Service Account Admin Settings and Configuration files added * [NEW] Service Account Admin Settings and Configuration files added * [NEW] Service Account Admin Settings and Configuration files added * Service Account Creation dialog added * [NEW] Service Account Creation method * Service Account owner username update method added * Fixed CLI errors * Fixed CLI errors * Service Account creation heading fixed * Service Account broadcast room callback added * Service Account creation method refactored * Service Account Callback completed * Typos fixed * CLI errors fixed * [NEW] Service Account one-tap login complete * Callbacks modified * Service Accounts directory tab added * Refactored creation method and added tests * CLI errors fixed * CLI errors fixed * Bugs fixed * [NEW] Service Accounts Login method * Typo fixed * CLI errors fixed * CLI errors fixed * [New] Service Account directory feature * CLI errors fixed * UsernameExists meteor method fixed * Sync commit * [NEW] Service Account subscription method added * [NEW] Service Account Broadcast Feature Added * [NEW] Service Account Broadcast Feature Added * [NEW] Service account subscription sidenav type * Broadcast Room name change handled * Lint errors fixed * getLoginToken method refactored * Console statements removed * Sidebar header permission modified * Merge branch service-accounts * Added service account directory search translation key * Subscribers count added * [NEW] Service Account sidenav type * Unread counter added in popver * Get linked service account method added * Partial rate limiter added * Added unread counter * Fixed CLI errors * Broadcast feature added * [FIX] Custom status displayed on room leader panel (#14958) * [FIX] LDAP login with customField sync (#14808) Closes #14661 * [FIX] Prevent error on trying insert message with duplicated id (#14945) * [FIX] OTR key icon missing on messages (#14953) * [FIX] Method `getUsersOfRoom` not returning offline users if limit is not defined (#14753) * [IMPROVE] Remove too specific helpers isFirefox() and isChrome() (#14963) * [FIX] Jump to message missing in Starred Messages (#14949) * [IMPROVE] Update tabs markup (#14964) * [FIX] Loading indicator positioning (#14968) * Remove broken markup * Recover lost class * [FIX] load more messages (#14967) * [FIX] eternal loading file list (#14952) * [FIX] 50 custom emoji limit (#14951) * Bump jquery from 3.3.1 to 3.4.0 in /packages/rocketchat-livech… (#14922) Bumps [jquery](https://github.com/jquery/jquery) from 3.3.1 to 3.4.0. - [Release notes](https://github.com/jquery/jquery/releases) - [Commits](https://github.com/jquery/jquery/compare/3.3.1...3.4.0) Signed-off-by: dependabot[bot] * [FIX] Allow storing the navigation history of unregistered Livechat visitors (#14970) * Remove validations before storing visitor navigation history. * Removed unused imports. * Update GPG key * [FIX] Wrong label order on room settings (#14960) * [FIX] Chrome doesn't load additional search results when botto… (#14965) * fix scroll * fix review * ops * [IMPROVEMENT] patch to improve emoji render (#14722) * path to improve emoji render * Apply suggestions from code review Co-Authored-By: Tasso Evangelista * Regression: patch to improve emoji render (#14980) This reverts commit b395b50398f605d85964dc2cf6d327095afe16f0. * [FIX] Users staying online after logout (#14966) * Remove unused dependency (lokijs) (#14973) * Bump juice version to 5.2.0 (#14974) * Bump node-rsa version to 1.0.5 (#14976) * Bump photoswipe version to 4.1.3 (#14977) * Remove unused Meteor dependency (yasinuslu:blaze-meta) (#14971) * Bump marked from 0.5.2 to 0.6.1 (#14969) * Bump marked from 0.5.2 to 0.6.1 Bumps [marked](https://github.com/markedjs/marked) from 0.5.2 to 0.6.1. - [Release notes](https://github.com/markedjs/marked/releases) - [Commits](https://github.com/markedjs/marked/compare/v0.5.2...v0.6.1) Signed-off-by: dependabot[bot] * Update package-lock * [IMPROVE] Federation routes #14972 * [IMPROVE] Extract federation config to its own file (#14992) * Revert "[IMPROVE] Federation routes #14972" * Extract federation config logic to its own file * Service account configurable approval process * Improve Docker compose readability (#14457) * [FIX] Not being able to mention users with "all" and "here" usernames - do not allow users register that usernames (#14468) * [FIX] Custom User Status throttled by rate limiter (#15001) * [FIX] CustomOauth Identity Step errors displayed in HTML format (#15000) * Service account message alert added * Lint errors fixed * fixed browseChannels method * fixed browseChannels method * Service Account Notification fixed --- app/lib/server/functions/notifications/serviceAccount.js | 4 ---- app/lib/server/lib/sendNotificationsOnMessage.js | 1 - 2 files changed, 5 deletions(-) diff --git a/app/lib/server/functions/notifications/serviceAccount.js b/app/lib/server/functions/notifications/serviceAccount.js index 92d45270ffe8..3776989c063b 100644 --- a/app/lib/server/functions/notifications/serviceAccount.js +++ b/app/lib/server/functions/notifications/serviceAccount.js @@ -2,7 +2,6 @@ import { metrics } from '../../../../metrics'; import { Notifications } from '../../../../notifications'; export function shouldNotifyServiceAccountOwner({ - statusConnection, hasMentionToAll, hasMentionToHere, isHighlighted, @@ -10,9 +9,6 @@ export function shouldNotifyServiceAccountOwner({ hasReplyToThread, roomType, }) { - if (statusConnection === 'online') { - return false; - } return roomType === 'd' || hasMentionToAll || hasMentionToHere || isHighlighted || hasMentionToUser || hasReplyToThread; } diff --git a/app/lib/server/lib/sendNotificationsOnMessage.js b/app/lib/server/lib/sendNotificationsOnMessage.js index ddda261a0537..0c37d2165110 100644 --- a/app/lib/server/lib/sendNotificationsOnMessage.js +++ b/app/lib/server/lib/sendNotificationsOnMessage.js @@ -153,7 +153,6 @@ export const sendNotification = async ({ } if (receiver.u && shouldNotifyServiceAccountOwner({ - statusConnection: receiver.statusConnection, hasMentionToAll, hasMentionToHere, isHighlighted,