1
0
Fork 0
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:
Matthias Ahouansou 2025-03-29 13:20:55 +00:00
parent 19d0ea408c
commit 3171b779c6
No known key found for this signature in database
5 changed files with 36 additions and 4 deletions

View file

@ -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>;