mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Fix story linking from private story reply.
This commit is contained in:
committed by
Cody Henthorne
parent
c3c8f8e7e6
commit
7af94f60ae
@@ -191,6 +191,24 @@ class StorySendTable(context: Context, databaseHelper: SignalDatabase) : Databas
|
||||
return messageIds
|
||||
}
|
||||
|
||||
fun getStoryMessageFor(recipientId: RecipientId, timestamp: Long): MessageId? {
|
||||
readableDatabase.query(
|
||||
TABLE_NAME,
|
||||
arrayOf(MESSAGE_ID),
|
||||
"$RECIPIENT_ID = ? AND $SENT_TIMESTAMP = ?",
|
||||
SqlUtil.buildArgs(recipientId, timestamp),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
"1"
|
||||
).use { cursor ->
|
||||
if (cursor.moveToFirst()) {
|
||||
return MessageId(cursor.requireLong(MESSAGE_ID))
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun remapRecipient(oldId: RecipientId, newId: RecipientId) {
|
||||
val query = "$RECIPIENT_ID = ?"
|
||||
val args = SqlUtil.buildArgs(oldId)
|
||||
|
||||
Reference in New Issue
Block a user