From e3c1eaa9d2554a7fe5c817cce8f7391b5f4a413b Mon Sep 17 00:00:00 2001 From: Vince Campanale Date: Thu, 8 Jun 2017 14:59:37 -0400 Subject: [PATCH] Preventing cardRead from notifying user. (#8473) * added condition to prevent readCard operations from sending a notification * created constant array to contain opNames for notifications we want to suppress and adjusted condition to accordingly * replaced const with var to past karma test --- website/client-old/js/services/userServices.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/client-old/js/services/userServices.js b/website/client-old/js/services/userServices.js index dd42725b2b..856c8230c8 100644 --- a/website/client-old/js/services/userServices.js +++ b/website/client-old/js/services/userServices.js @@ -158,7 +158,8 @@ angular.module('habitrpg') var clientMessage = clientResponse[1]; - if (clientMessage) { + var opNamesWithoutNotification = ["readCard"]; + if (clientMessage && opNamesWithoutNotification.indexOf(opName) === -1) { Notification.text(clientMessage); }