mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-07 22:52:24 +00:00
Make 'push' status a type bit on both incoming and outgoing msgs.
This commit is contained in:
@@ -20,11 +20,13 @@ public class IncomingMediaMessage {
|
||||
private final PduHeaders headers;
|
||||
private final PduBody body;
|
||||
private final String groupId;
|
||||
private final boolean push;
|
||||
|
||||
public IncomingMediaMessage(RetrieveConf retreived) {
|
||||
this.headers = retreived.getPduHeaders();
|
||||
this.body = retreived.getBody();
|
||||
this.groupId = null;
|
||||
this.push = false;
|
||||
}
|
||||
|
||||
public IncomingMediaMessage(MasterSecret masterSecret, String localNumber,
|
||||
@@ -33,6 +35,7 @@ public class IncomingMediaMessage {
|
||||
{
|
||||
this.headers = new PduHeaders();
|
||||
this.body = new PduBody();
|
||||
this.push = true;
|
||||
|
||||
if (messageContent.hasGroup()) {
|
||||
this.groupId = GroupUtil.getEncodedId(messageContent.getGroup().getId().toByteArray());
|
||||
@@ -84,6 +87,10 @@ public class IncomingMediaMessage {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public boolean isPushMessage() {
|
||||
return push;
|
||||
}
|
||||
|
||||
public boolean isGroupMessage() {
|
||||
return groupId != null ||
|
||||
!Util.isEmpty(headers.getEncodedStringValues(PduHeaders.CC)) ||
|
||||
|
||||
Reference in New Issue
Block a user