Compare commits

..

1 Commits

Author SHA1 Message Date
62a7cc66bc Allow event ids from clients 2022-08-27 22:33:40 +02:00

View File

@@ -26,7 +26,10 @@ async fn new_event(input: Input, session: Option<Session>) -> Result<Output, Err
let mut uuids = vec![];
// TODO check permissions
for mut event in input.events {
let uuid = Uuid::new_v4();
let uuid = match event.id {
Some(id) => id,
None => Uuid::new_v4(),
};
event.id = Some(uuid);
uuids.push(uuid);
subscription::push_room(&input.room_id, event).await?;