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
This commit is contained in:
Vince Campanale 2017-06-08 14:59:37 -04:00 committed by Keith Holliday
parent 17c0f795cc
commit e3c1eaa9d2

View file

@ -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);
}