Skip to content

Prepare for release 1.21.2 #1029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ configurations.configureEach {
exclude module: "commons-logging"
}

def canonicalVersionCode = 397
def canonicalVersionName = "1.21.1"
def canonicalVersionCode = 398
def canonicalVersionName = "1.21.2"

def postFixSize = 10
def abiPostFix = ['armeabi-v7a' : 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public class ApplicationContext extends Application implements DefaultLifecycleO
@Inject ConfigUploader configUploader;
@Inject AdminStateSync adminStateSync;
@Inject DestroyedGroupSync destroyedGroupSync;
@Inject RemoveGroupMemberHandler removeGroupMemberHandler;
@Inject RemoveGroupMemberHandler removeGroupMemberHandler; // Exists here only to start upon app starts
@Inject SnodeClock snodeClock;
@Inject ExpiringMessageManager expiringMessageManager;
@Inject TypingStatusRepository typingStatusRepository;
Expand Down Expand Up @@ -302,7 +302,6 @@ public void onCreate() {
snodeClock.start();
pushRegistrationHandler.run();
configUploader.start();
removeGroupMemberHandler.start();
destroyedGroupSync.start();
adminStateSync.start();
cleanupInvitationHandler.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.groups.handler
import android.content.Context
import com.google.protobuf.ByteString
import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.Job
Expand Down Expand Up @@ -49,6 +50,7 @@ private const val TAG = "RemoveGroupMemberHandler"
*
* It automatically does so by listening to the config updates changes and checking for any pending removals.
*/
@OptIn(DelicateCoroutinesApi::class, ExperimentalCoroutinesApi::class)
@Singleton
class RemoveGroupMemberHandler @Inject constructor(
@ApplicationContext private val context: Context,
Expand All @@ -59,13 +61,8 @@ class RemoveGroupMemberHandler @Inject constructor(
private val storage: StorageProtocol,
private val groupScope: GroupScope,
) {
private var job: Job? = null

@OptIn(ExperimentalCoroutinesApi::class)
fun start() {
require(job == null) { "Already started" }

job = GlobalScope.launch {
init {
GlobalScope.launch {
textSecurePreferences
.watchLocalNumber()
.flatMapLatest { localNumber ->
Expand All @@ -80,14 +77,17 @@ class RemoveGroupMemberHandler @Inject constructor(
val adminKey = configFactory.getGroup(update.groupId)?.adminKey
if (adminKey != null) {
groupScope.launch(update.groupId, "Handle possible group removals") {
processPendingRemovalsForGroup(update.groupId, adminKey)
try {
processPendingRemovalsForGroup(update.groupId, adminKey)
} catch (ec: Exception) {
Log.e("RemoveGroupMemberHandler", "Error processing pending removals", ec)
}
}
}
}
}
}


private suspend fun processPendingRemovalsForGroup(
groupAccountId: AccountId,
adminKey: ByteArray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ class MarkReadReceiver : BroadcastReceiver() {

hashToDisappearAfterReadMessage(context, markedReadMessages)?.let { hashToMessages ->
GlobalScope.launch {
fetchUpdatedExpiriesAndScheduleDeletion(context, hashToMessages)
shortenExpiryOfDisappearingAfterRead(hashToMessages)
try {
fetchUpdatedExpiriesAndScheduleDeletion(context, hashToMessages)
shortenExpiryOfDisappearingAfterRead(hashToMessages)
} catch (e: Exception) {
Log.e(TAG, "Failed to fetch updated expiries and schedule deletion", e)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import org.session.libsignal.protos.SignalServiceProtos
import org.session.libsignal.utilities.AccountId
import org.session.libsignal.utilities.Base64
import org.session.libsignal.utilities.IdPrefix
import org.session.libsignal.utilities.Log
import org.session.libsignal.utilities.Namespace
import org.session.libsignal.utilities.defaultRequiresAuth
import org.session.libsignal.utilities.hasNamespaces
Expand Down Expand Up @@ -511,7 +512,11 @@ object MessageSender {

storage.markAsSyncing(timestamp, userPublicKey)
GlobalScope.launch {
sendToSnodeDestination(Destination.Contact(userPublicKey), message, true)
try {
sendToSnodeDestination(Destination.Contact(userPublicKey), message, true)
} catch (ec: Exception) {
Log.e("MessageSender", "Unable to send sync message", ec)
}
}
}
}
Expand Down