Relying on the flag for voice notes and ignoring empty file names as that legacy logic is too outdated now (#947)

pull/1710/head
ThomasSession 2 months ago committed by GitHub
parent 87cd979473
commit 79858a2336
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -38,7 +38,6 @@ import org.session.libsignal.crypto.ecc.DjbECPublicKey
import org.session.libsignal.crypto.ecc.ECKeyPair
import org.session.libsignal.utilities.AccountId
import org.session.libsignal.utilities.Log
import org.thoughtcrime.securesms.database.MmsDatabase
import org.thoughtcrime.securesms.database.MmsSmsDatabase
import org.thoughtcrime.securesms.database.RecipientDatabase
import org.thoughtcrime.securesms.database.ThreadDatabase
@ -64,7 +63,6 @@ class ConfigToDatabaseSync @Inject constructor(
private val storage: StorageProtocol,
private val threadDatabase: ThreadDatabase,
private val recipientDatabase: RecipientDatabase,
private val mmsDatabase: MmsDatabase,
private val pollerFactory: PollerFactory,
private val clock: SnodeClock,
private val profileManager: ProfileManager,

@ -120,9 +120,7 @@ public abstract class Attachment {
}
public boolean isVoiceNote() {
// A missing file name is the legacy way to determine if an audio attachment is
// a voice note vs. other arbitrary audio attachments.
return voiceNote || getFileName() == null || getFileName().isEmpty();
return voiceNote;
}
public int getWidth() {

Loading…
Cancel
Save