Added a new type of chat message: a UserSystemMessage is a system message
triggered by the activity of another user. The other username is provided so that the message can be muted if desired. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3770 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// $Id$
|
||||
|
||||
package com.threerings.crowd.chat.data;
|
||||
|
||||
import com.threerings.util.Name;
|
||||
|
||||
/**
|
||||
* A system message triggered by the activity of another user.
|
||||
* If the user is muted we can suppress this message, unlike a normal
|
||||
* system message.
|
||||
*/
|
||||
public class UserSystemMessage extends SystemMessage
|
||||
{
|
||||
/** The "speaker" of this message, the user that triggered that this
|
||||
* message be sent to us. */
|
||||
public Name speaker;
|
||||
|
||||
/** Suitable for unserialization. */
|
||||
public UserSystemMessage ()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a INFO-level UserSystemMessage.
|
||||
*/
|
||||
public UserSystemMessage (Name sender, String message, String bundle)
|
||||
{
|
||||
this(sender, message, bundle, INFO);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a UserSystemMessage.
|
||||
*/
|
||||
public UserSystemMessage (Name sender, String message, String bundle,
|
||||
byte attentionLevel)
|
||||
{
|
||||
super(message, bundle, attentionLevel);
|
||||
this.speaker = sender;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user