fix "delete all notifications by user" query (#4821)
The brackets were at the wrong position and notification types are actually serialized differently. Closes #4817
This commit is contained in:
parent
dee1767ec1
commit
20cb3848ee
2 changed files with 7 additions and 6 deletions
|
|
@ -108,10 +108,10 @@ AND
|
|||
*/
|
||||
@Query(
|
||||
"""DELETE FROM NotificationEntity WHERE tuskyAccountId = :tuskyAccountId AND
|
||||
statusId IN
|
||||
(SELECT serverId FROM TimelineStatusEntity WHERE tuskyAccountId = :tuskyAccountId AND
|
||||
(authorServerId == :userId OR accountId == :userId))
|
||||
AND type != "admin.sign_up" AND type != "admin.report"
|
||||
(accountId = :userId OR
|
||||
statusId IN (SELECT serverId FROM TimelineStatusEntity WHERE tuskyAccountId = :tuskyAccountId AND authorServerId = :userId)
|
||||
)
|
||||
AND type != "SIGN_UP" AND type != "REPORT"
|
||||
"""
|
||||
)
|
||||
abstract suspend fun removeAllByUser(tuskyAccountId: Long, userId: String)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue