summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/event-handler-service.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js

index 72859eae3e..0c7c0d1696 100644 --- a/webclient/components/matrix/event-handler-service.js +++ b/webclient/components/matrix/event-handler-service.js
@@ -74,10 +74,8 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) { // bing word list check if (bingWords && !shouldBing) { for (var i=0; i<bingWords.length; i++) { - // TODO: Should really be a word check, not a string of characters check. - // E.g. bing word is "coffee", "I have coffee" = bing, "I am a coffeepot" = no bing - // Currently it will bing for both. - if (content.indexOf(bingWords[i]) != -1) { + var re = RegExp(bingWords[i]); + if (content.search(re) != -1) { shouldBing = true; break; }