mirror of
https://github.com/oxen-io/session-android.git
synced 2025-07-11 02:28:35 +00:00
Log the version in our PersistentLogger.
This commit is contained in:
parent
20ad166e0f
commit
956e3924ff
@ -1038,12 +1038,16 @@ public final class PushProcessMessageJob extends BaseJob {
|
||||
}
|
||||
|
||||
private void handleSynchronizeViewOnceOpenMessage(@NonNull ViewOnceOpenMessage openMessage, long envelopeTimestamp) {
|
||||
log(TAG, String.valueOf(envelopeTimestamp), "Handling a view-once open for message: " + openMessage.getTimestamp());
|
||||
|
||||
RecipientId author = Recipient.externalPush(context, openMessage.getSender()).getId();
|
||||
long timestamp = openMessage.getTimestamp();
|
||||
MessageRecord record = DatabaseFactory.getMmsSmsDatabase(context).getMessageFor(timestamp, author);
|
||||
|
||||
if (record != null && record.isMms()) {
|
||||
DatabaseFactory.getAttachmentDatabase(context).deleteAttachmentFilesForViewOnceMessage(record.getId());
|
||||
} else {
|
||||
warn(TAG, String.valueOf(envelopeTimestamp), "Got a view-once open message for a message we don't have!");
|
||||
}
|
||||
|
||||
MessageNotifier messageNotifier = ApplicationDependencies.getMessageNotifier();
|
||||
|
@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import androidx.annotation.AnyThread;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import org.thoughtcrime.securesms.BuildConfig;
|
||||
import org.thoughtcrime.securesms.database.NoExternalStorageException;
|
||||
import org.thoughtcrime.securesms.util.concurrent.ListenableFuture;
|
||||
import org.thoughtcrime.securesms.util.concurrent.SettableFuture;
|
||||
@ -34,6 +35,8 @@ public final class PersistentLogger extends Log.Logger {
|
||||
private static final String LOG_E = "E";
|
||||
private static final String LOG_WTF = "A";
|
||||
|
||||
private static final String VERSION_TAG = "[" + BuildConfig.VERSION_NAME + "]";
|
||||
|
||||
private static final String LOG_DIRECTORY = "log";
|
||||
private static final String FILENAME_PREFIX = "log-";
|
||||
private static final int MAX_LOG_FILES = 7;
|
||||
@ -239,6 +242,6 @@ public final class PersistentLogger extends Log.Logger {
|
||||
}
|
||||
|
||||
private String buildEntry(String level, String tag, String message, Date date) {
|
||||
return DATE_FORMAT.format(date) + ' ' + level + ' ' + tag + ": " + message;
|
||||
return VERSION_TAG + ' ' +DATE_FORMAT.format(date) + ' ' + level + ' ' + tag + ": " + message;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user