feat: send read receipts over federation
currently they will only be sent if a PDU has to be sent as well
This commit is contained in:
parent
24793891e0
commit
8f27e6123b
6 changed files with 197 additions and 10 deletions
|
@ -258,4 +258,16 @@ impl Globals {
|
|||
}
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
pub fn database_version(&self) -> Result<u64> {
|
||||
self.globals.get("version")?.map_or(Ok(0), |version| {
|
||||
utils::u64_from_bytes(&version)
|
||||
.map_err(|_| Error::bad_database("Database version id is invalid."))
|
||||
})
|
||||
}
|
||||
|
||||
pub fn bump_database_version(&self, new_version: u64) -> Result<()> {
|
||||
self.globals.insert("version", &new_version.to_be_bytes())?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue