mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Return whether event already existed from event_handler.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
0746f4b1ad
commit
dafbe59d00
7 files changed
+13
-9
No files matched your search
@@ -208,6 +208,7 @@ async fn create_join_event(
|
||||
.handle_incoming_pdu(&origin, room_id, &event_id, value.clone(), true)
|
||||
.boxed()
|
||||
.await?
|
||||
.map(at!(0))
|
||||
.ok_or_else(|| err!(Request(InvalidParam("Could not accept as timeline event."))))?;
|
||||
|
||||
drop(mutex_lock);
|
||||
|
||||
@@ -11,7 +11,7 @@ use ruma::{
|
||||
serde::JsonObject,
|
||||
};
|
||||
use tuwunel_core::{
|
||||
Err, Result, err,
|
||||
Err, Result, at, err,
|
||||
matrix::{event::gen_event_id_canonical_json, pdu::PduEvent},
|
||||
warn,
|
||||
};
|
||||
@@ -170,6 +170,7 @@ pub(crate) async fn create_knock_event_v1_route(
|
||||
.handle_incoming_pdu(&origin, &body.room_id, &event_id, value.clone(), true)
|
||||
.boxed()
|
||||
.await?
|
||||
.map(at!(0))
|
||||
.ok_or_else(|| err!(Request(InvalidParam("Could not accept as timeline event."))))?;
|
||||
|
||||
drop(mutex_lock);
|
||||
|
||||
@@ -11,7 +11,7 @@ use ruma::{
|
||||
},
|
||||
};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
use tuwunel_core::{Err, Result, err, matrix::event::gen_event_id_canonical_json};
|
||||
use tuwunel_core::{Err, Result, at, err, matrix::event::gen_event_id_canonical_json};
|
||||
use tuwunel_service::Services;
|
||||
|
||||
use crate::Ruma;
|
||||
@@ -151,6 +151,7 @@ async fn create_leave_event(
|
||||
.handle_incoming_pdu(origin, room_id, &event_id, value, true)
|
||||
.boxed()
|
||||
.await?
|
||||
.map(at!(0))
|
||||
.ok_or_else(|| err!(Request(InvalidParam("Could not accept as timeline event."))))?;
|
||||
|
||||
drop(mutex_lock);
|
||||
|
||||
Reference in new issue
Block a user