diff --git a/otp/chat/WhiteList.py b/otp/chat/WhiteList.py index 77a2560c..b102384b 100755 --- a/otp/chat/WhiteList.py +++ b/otp/chat/WhiteList.py @@ -46,10 +46,11 @@ class WhiteList: lastWord = words[-1] - if (not lastWord) or self.isPrefix(lastWord): - newWords[-1] = lastWord - else: - newWords[-1] = self.getReplacement(lastWord, av, garbler) + if not garbler: + if (not lastWord) or self.isPrefix(lastWord): + newWords[-1] = lastWord + else: + newWords[-1] = self.getReplacement(lastWord, av, garbler) return ' '.join(newWords)