feat: add emoji

This commit is contained in:
Paul Makles
2022-07-07 13:23:31 +01:00
parent 386f027a5a
commit a7e0c42ee4
28 changed files with 453 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ use crate::Result;
#[async_trait]
pub trait AbstractAttachment: Sync + Send {
/// Find an attachment by its details and mark it as used by a given parent.
async fn find_and_use_attachment(
&self,
id: &str,
@@ -10,8 +11,16 @@ pub trait AbstractAttachment: Sync + Send {
parent_type: &str,
parent_id: &str,
) -> Result<File>;
/// Insert attachment into database.
async fn insert_attachment(&self, attachment: &File) -> Result<()>;
/// Mark an attachment as having been reported.
async fn mark_attachment_as_reported(&self, id: &str) -> Result<()>;
/// Mark an attachment as having been deleted.
async fn mark_attachment_as_deleted(&self, id: &str) -> Result<()>;
/// Mark multiple attachments as having been deleted.
async fn mark_attachments_as_deleted(&self, ids: &[String]) -> Result<()>;
}