44 lines
1.3 KiB
Java
44 lines
1.3 KiB
Java
package envoy.event;
|
|
|
|
import java.time.Instant;
|
|
|
|
import envoy.data.GroupMessage;
|
|
import envoy.data.Message.MessageStatus;
|
|
|
|
/**
|
|
* @author Maximilian Käfer
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
public final class GroupMessageStatusChange extends MessageStatusChange {
|
|
|
|
private final long memberID;
|
|
|
|
private static final long serialVersionUID = 0L;
|
|
|
|
/**
|
|
* Initializes a {@link GroupMessageStatusChange}.
|
|
*
|
|
* @param id the ID of the {@link GroupMessage} this event is related to
|
|
* @param status the status of this specific members {@link GroupMessage}
|
|
* @param date the date at which the MessageStatus change occurred for this specific member
|
|
* @param memberID the ID of the group member that caused the status change
|
|
* @since Envoy Common v0.2-beta
|
|
*/
|
|
public GroupMessageStatusChange(long id, MessageStatus status, Instant date, long memberID) {
|
|
super(id, status, date);
|
|
this.memberID = memberID;
|
|
}
|
|
|
|
/**
|
|
* @return the memberID which the user who sends this event has
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
public long getMemberID() { return memberID; }
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.format("GroupMessageStatusChange[meta=%s,memberID=%d]", super.toString(),
|
|
memberID);
|
|
}
|
|
}
|