Match some of the changes on the actionscript side, but did not
bring the "ChatSnooper" interface over, because it's not yet needed here. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5623 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -363,7 +363,7 @@ public class ChatDirector extends BasicDirector
|
|||||||
*/
|
*/
|
||||||
public void dispatchMessage (ChatMessage message, String localType)
|
public void dispatchMessage (ChatMessage message, String localType)
|
||||||
{
|
{
|
||||||
message.setClientInfo(xlate(message.bundle, message.message), localType);
|
setClientInfo(message, localType);
|
||||||
dispatchPreparedMessage(message);
|
dispatchPreparedMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,13 +723,12 @@ public class ChatDirector extends BasicDirector
|
|||||||
speakerDisplay = speaker;
|
speakerDisplay = speaker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Translate and timestamp the message. This would happen during dispatch but we
|
||||||
|
// need to do it ahead of filtering.
|
||||||
|
setClientInfo(msg, localtype);
|
||||||
|
|
||||||
// if there was an originating speaker, see if we want to hear it
|
// if there was an originating speaker, see if we want to hear it
|
||||||
if (speaker != null) {
|
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) {
|
if ((msg.message = filter(msg.message, speaker, false)) == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1000,6 +999,16 @@ public class ChatDirector extends BasicDirector
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the "client info" on the specified message, if not already set.
|
||||||
|
*/
|
||||||
|
protected void setClientInfo (ChatMessage msg, String localType)
|
||||||
|
{
|
||||||
|
if (msg.localtype == null) {
|
||||||
|
msg.setClientInfo(xlate(msg.bundle, msg.message), localType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates the specified message using the specified bundle.
|
* Translates the specified message using the specified bundle.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user