mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-15 05:47:36 +00:00
fix: getting local user's ID if message is outgoing to check against that value in attachment download
This commit is contained in:
@@ -119,6 +119,13 @@ class DatabaseAttachmentProvider(context: Context, helper: SQLCipherOpenHelper)
|
||||
), threadId)
|
||||
}
|
||||
|
||||
override fun isMmsOutgoing(mmsMessageId: Long): Boolean {
|
||||
val mmsDb = DatabaseFactory.getMmsDatabase(context)
|
||||
return mmsDb.getMessage(mmsMessageId).use { cursor ->
|
||||
mmsDb.readerFor(cursor).next
|
||||
}.isOutgoing
|
||||
}
|
||||
|
||||
override fun isOutgoingMessage(timestamp: Long): Boolean {
|
||||
val smsDatabase = DatabaseFactory.getSmsDatabase(context)
|
||||
val mmsDatabase = DatabaseFactory.getMmsDatabase(context)
|
||||
|
Reference in New Issue
Block a user