mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
7b589c4300
// FREEBIE
33 lines
844 B
Java
33 lines
844 B
Java
package org.thoughtcrime.securesms.sms;
|
|
|
|
import static org.whispersystems.signalservice.internal.push.SignalServiceProtos.GroupContext;
|
|
|
|
public class IncomingGroupMessage extends IncomingTextMessage {
|
|
|
|
private final GroupContext groupContext;
|
|
|
|
public IncomingGroupMessage(IncomingTextMessage base, GroupContext groupContext, String body) {
|
|
super(base, body);
|
|
this.groupContext = groupContext;
|
|
}
|
|
|
|
@Override
|
|
public IncomingGroupMessage withMessageBody(String body) {
|
|
return new IncomingGroupMessage(this, groupContext, body);
|
|
}
|
|
|
|
@Override
|
|
public boolean isGroup() {
|
|
return true;
|
|
}
|
|
|
|
public boolean isUpdate() {
|
|
return groupContext.getType().getNumber() == GroupContext.Type.UPDATE_VALUE;
|
|
}
|
|
|
|
public boolean isQuit() {
|
|
return groupContext.getType().getNumber() == GroupContext.Type.QUIT_VALUE;
|
|
}
|
|
|
|
}
|