Prevent double pEp text

This commit is contained in:
M66B 2021-03-02 18:00:55 +01:00
parent f571d270bd
commit ad54c353c2
2 changed files with 8 additions and 0 deletions

View File

@ -98,6 +98,12 @@ public interface DaoAttachment {
" AND (NOT (error IS :error) OR progress IS NOT NULL OR NOT (available IS 0))")
void setError(long id, String error);
@Query("UPDATE attachment" +
" SET type = :type" +
" WHERE id = :id" +
" AND NOT (type IS :type)")
void setType(long id, String type);
@Query("UPDATE attachment" +
" SET disposition = :disposition" +
" WHERE id = :id" +

View File

@ -6983,6 +6983,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
Helper.writeText(message.getFile(context), html);
db.attachment().setType(remote.id, "application/octet-stream");
}
}