mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Don't issue new user notification if secure session exists
Fixes #4800 // FREEBIE
This commit is contained in:
parent
ef5a0a0ff3
commit
8a3762b337
@ -15,6 +15,8 @@ import android.util.Pair;
|
||||
import org.thoughtcrime.securesms.ApplicationContext;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.crypto.SessionUtil;
|
||||
import org.thoughtcrime.securesms.crypto.storage.TextSecureSessionStore;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.NotInDirectoryException;
|
||||
import org.thoughtcrime.securesms.database.TextSecureDirectory;
|
||||
@ -212,11 +214,13 @@ public class DirectoryHelper {
|
||||
@NonNull List<String> newUsers)
|
||||
{
|
||||
for (String newUser : newUsers) {
|
||||
if (!SessionUtil.hasSession(context, masterSecret, newUser)) {
|
||||
IncomingJoinedMessage message = new IncomingJoinedMessage(newUser);
|
||||
Pair<Long, Long> smsAndThreadId = DatabaseFactory.getSmsDatabase(context).insertMessageInbox(message);
|
||||
MessageNotifier.updateNotification(context, masterSecret, smsAndThreadId.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Optional<Account> getOrCreateAccount(Context context) {
|
||||
AccountManager accountManager = AccountManager.get(context);
|
||||
|
Loading…
Reference in New Issue
Block a user