mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-08-01 17:38:36 +00:00
feat(media): save user id of uploader
This commit is contained in:
parent
19d0ea408c
commit
3171b779c6
5 changed files with 36 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
use ruma::ServerName;
|
||||
use ruma::{ServerName, UserId};
|
||||
use sha2::{digest::Output, Sha256};
|
||||
|
||||
use crate::Result;
|
||||
|
@ -6,6 +6,7 @@ use crate::Result;
|
|||
use super::DbFileMeta;
|
||||
|
||||
pub trait Data: Send + Sync {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn create_file_metadata(
|
||||
&self,
|
||||
sha256_digest: Output<Sha256>,
|
||||
|
@ -14,6 +15,7 @@ pub trait Data: Send + Sync {
|
|||
media_id: &str,
|
||||
filename: Option<&str>,
|
||||
content_type: Option<&str>,
|
||||
user_id: Option<&UserId>,
|
||||
) -> Result<()>;
|
||||
|
||||
fn search_file_metadata(&self, servername: &ServerName, media_id: &str) -> Result<DbFileMeta>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue