mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +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:
parent
ce7b8ab75a
commit
023d776e96
@ -445,6 +445,7 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
|
||||
OutgoingGroupMediaMessage outgoingMessage = new OutgoingGroupMediaMessage(self, getRecipients(),
|
||||
context, null);
|
||||
MessageSender.send(self, masterSecret, outgoingMessage, threadId);
|
||||
DatabaseFactory.getGroupDatabase(self).remove(groupId, TextSecurePreferences.getLocalNumber(self));
|
||||
initializeEnabledCheck();
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, e);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user