Update pleroma status cache on reaction
This commit is contained in:
parent
5d09d9a77c
commit
2c55491274
|
@ -42,6 +42,10 @@ class CacheUpdater @Inject constructor(
|
|||
}
|
||||
is PinEvent ->
|
||||
timelineDao.setPinned(accountId, event.statusId, event.pinned)
|
||||
is EmojiReactEvent -> {
|
||||
val pleromaString = gson.toJson(event.newStatus.pleroma)
|
||||
timelineDao.setPleroma(accountId, event.newStatus.id, pleromaString)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,6 +194,9 @@ WHERE timelineUserId = :accountId AND (serverId = :statusId OR reblogServerId =
|
|||
)
|
||||
abstract suspend fun setPinned(accountId: Long, statusId: String, pinned: Boolean)
|
||||
|
||||
@Query("""UPDATE TimelineStatusEntity SET pleroma = :pleroma WHERE timelineUserId = :accountId AND (serverId = :statusId OR reblogServerId = :statusId)""")
|
||||
abstract fun setPleroma(accountId: Long, statusId: String, pleroma: String)
|
||||
|
||||
@Query(
|
||||
"""DELETE FROM TimelineStatusEntity
|
||||
WHERE timelineUserId = :accountId AND authorServerId IN (
|
||||
|
|
Loading…
Reference in New Issue