support timestamped appservice messaging
Co-authored-by: strawberry <strawberry@puppygock.gay> Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
66679c7522
commit
2d9aab2e79
14 changed files with 69 additions and 5 deletions
|
@ -638,6 +638,7 @@ impl Service {
|
|||
unsigned,
|
||||
state_key,
|
||||
redacts,
|
||||
timestamp,
|
||||
} = pdu_builder;
|
||||
|
||||
let prev_events: Vec<_> = self
|
||||
|
@ -705,9 +706,14 @@ impl Service {
|
|||
room_id: room_id.to_owned(),
|
||||
sender: sender.to_owned(),
|
||||
origin: None,
|
||||
origin_server_ts: utils::millis_since_unix_epoch()
|
||||
.try_into()
|
||||
.expect("time is valid"),
|
||||
origin_server_ts: timestamp.map_or_else(
|
||||
|| {
|
||||
utils::millis_since_unix_epoch()
|
||||
.try_into()
|
||||
.expect("u64 fits into UInt")
|
||||
},
|
||||
|ts| ts.get(),
|
||||
),
|
||||
kind: event_type,
|
||||
content,
|
||||
state_key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue