We need to ensure our message has been translated before we try to filter it. Otherwise when a NPP says something where the key contains a word filtered in a particular language, the system doesn't find the key, and everyone gets really confused. (Was not a problem before because we normally filter using word breaks... but not all languages use such things as spaces.)

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5236 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2008-07-17 18:17:27 +00:00
parent 2b39fb9e49
commit e114e90a05
@@ -724,6 +724,12 @@ public class ChatDirector extends BasicDirector
// if there was an originating speaker, see if we want to hear it
if (speaker != null) {
// We pre-translate this message here because we're about to filter it.
// And if we filter first, we could end up filtering keys.
msg.message = xlate(msg.bundle, msg.message);
msg.bundle = null;
if ((msg.message = filter(msg.message, speaker, false)) == null) {
return;
}