Add more logging around threads in message sends.

This commit is contained in:
Greyson Parrelli
2021-03-08 15:27:10 -05:00
committed by Cody Henthorne
parent d1e0f3646a
commit 992b04f8c5
7 changed files with 26 additions and 20 deletions

View File

@@ -1053,7 +1053,13 @@ public class ThreadDatabase extends Database {
public long getOrCreateValidThreadId(@NonNull Recipient recipient, long candidateId, int distributionType) {
if (candidateId != -1) {
Optional<Long> remapped = RemappedRecords.getInstance().getThread(context, candidateId);
return remapped.isPresent() ? remapped.get() : candidateId;
if (remapped.isPresent()) {
Log.i(TAG, "Using remapped threadId: " + candidateId + " -> " + remapped.get());
return remapped.get();
} else {
return candidateId;
}
} else {
return getThreadIdFor(recipient, distributionType);
}