mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-26 07:30:16 +00:00
Reactivate a group if a contact gets readded
Fixes #723 //FREEBIE Removes the own number from group on leaving, to receive a proper re-added message
This commit is contained in:
@@ -26,6 +26,7 @@ import static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageCo
|
||||
|
||||
public class GroupReceiver {
|
||||
|
||||
private static final String TAG = GroupReceiver.class.getSimpleName();;
|
||||
private final Context context;
|
||||
|
||||
public GroupReceiver(Context context) {
|
||||
@@ -38,12 +39,12 @@ public class GroupReceiver {
|
||||
boolean secure)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
if (!secure) {
|
||||
Log.w("GroupReceiver", "Received insecure group push action! Ignoring...");
|
||||
Log.w(TAG, "Received insecure group push action! Ignoring...");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,7 +61,7 @@ public class GroupReceiver {
|
||||
} else if (record != null && type == GroupContext.Type.QUIT_VALUE) {
|
||||
handleGroupLeave(masterSecret, message, group, record);
|
||||
} 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();
|
||||
}
|
||||
|
||||
if (!groupRecord.isActive()) database.setActive(id, true);
|
||||
storeMessage(masterSecret, message, group);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user