Reset preview on resetting content

This commit is contained in:
M66B 2020-02-12 11:28:45 +01:00
parent 6f490c15d2
commit b8d611802b
1 changed files with 1 additions and 1 deletions

View File

@ -533,7 +533,7 @@ public interface DaoMessage {
int setMessageRevisions(long id, Integer revisions); int setMessageRevisions(long id, Integer revisions);
@Query("UPDATE message" + @Query("UPDATE message" +
" SET content = :content, fts = 0" + " SET content = :content, fts = 0, preview = CASE WHEN :content THEN preview ELSE NULL END" +
" WHERE id = :id") " WHERE id = :id")
int setMessageContent(long id, boolean content); int setMessageContent(long id, boolean content);