|
|
@ -26,6 +26,7 @@ import static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageCo
|
|
|
|
|
|
|
|
|
|
|
|
public class GroupReceiver {
|
|
|
|
public class GroupReceiver {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final String TAG = GroupReceiver.class.getSimpleName();;
|
|
|
|
private final Context context;
|
|
|
|
private final Context context;
|
|
|
|
|
|
|
|
|
|
|
|
public GroupReceiver(Context context) {
|
|
|
|
public GroupReceiver(Context context) {
|
|
|
@ -38,12 +39,12 @@ public class GroupReceiver {
|
|
|
|
boolean secure)
|
|
|
|
boolean secure)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!messageContent.getGroup().hasId()) {
|
|
|
|
if (!messageContent.getGroup().hasId()) {
|
|
|
|
Log.w("GroupReceiver", "Received group message with no id! Ignoring...");
|
|
|
|
Log.w(TAG, "Received group message with no id! Ignoring...");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!secure) {
|
|
|
|
if (!secure) {
|
|
|
|
Log.w("GroupReceiver", "Received insecure group push action! Ignoring...");
|
|
|
|
Log.w(TAG, "Received insecure group push action! Ignoring...");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -60,7 +61,7 @@ public class GroupReceiver {
|
|
|
|
} else if (record != null && type == GroupContext.Type.QUIT_VALUE) {
|
|
|
|
} else if (record != null && type == GroupContext.Type.QUIT_VALUE) {
|
|
|
|
handleGroupLeave(masterSecret, message, group, record);
|
|
|
|
handleGroupLeave(masterSecret, message, group, record);
|
|
|
|
} else if (type == GroupContext.Type.UNKNOWN_VALUE) {
|
|
|
|
} else if (type == GroupContext.Type.UNKNOWN_VALUE) {
|
|
|
|
Log.w("GroupReceiver", "Received unknown type, ignoring...");
|
|
|
|
Log.w(TAG, "Received unknown type, ignoring...");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -117,6 +118,7 @@ public class GroupReceiver {
|
|
|
|
group = group.toBuilder().clearName().build();
|
|
|
|
group = group.toBuilder().clearName().build();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!groupRecord.isActive()) database.setActive(id, true);
|
|
|
|
storeMessage(masterSecret, message, group);
|
|
|
|
storeMessage(masterSecret, message, group);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|