Notify conversations for deleted stories.

This commit is contained in:
Sagar
2025-04-09 20:02:25 +05:30
committed by Michelle Tang
parent b64f3a48bf
commit 13d0d25f77

View File

@@ -1743,13 +1743,21 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
private fun disassociateStoryQuotes(storyId: Long) {
writableDatabase
.update(TABLE_NAME)
.values(
QUOTE_MISSING to 1,
QUOTE_BODY to null
.rawQuery(
"""
UPDATE $TABLE_NAME
SET $QUOTE_MISSING = 1, $QUOTE_BODY = NULL
WHERE $PARENT_STORY_ID = ${DirectReply(storyId).serialize()}
RETURNING $THREAD_ID
""".trimIndent()
)
.where("$PARENT_STORY_ID = ?", DirectReply(storyId).serialize())
.run()
.readToList { cursor ->
cursor.requireLong(THREAD_ID)
}
.distinct()
.forEach { threadId ->
notifyConversationListeners(threadId)
}
}
fun isGroupQuitMessage(messageId: Long): Boolean {