mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-08-04 11:43:58 +00:00
Support optional device_id's in lazy-loading context.
Co-authored-by: Jade Ellis <jade@ellis.link> Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
49f7a2487f
commit
2051c22a28
4 changed files with 17 additions and 19 deletions
|
@ -27,7 +27,7 @@ pub trait Options: Send + Sync {
|
|||
#[derive(Clone, Debug)]
|
||||
pub struct Context<'a> {
|
||||
pub user_id: &'a UserId,
|
||||
pub device_id: &'a DeviceId,
|
||||
pub device_id: Option<&'a DeviceId>,
|
||||
pub room_id: &'a RoomId,
|
||||
pub token: Option<u64>,
|
||||
pub options: Option<&'a LazyLoadOptions>,
|
||||
|
@ -40,7 +40,7 @@ pub enum Status {
|
|||
}
|
||||
|
||||
pub type Witness = HashSet<OwnedUserId>;
|
||||
type Key<'a> = (&'a UserId, &'a DeviceId, &'a RoomId, &'a UserId);
|
||||
type Key<'a> = (&'a UserId, Option<&'a DeviceId>, &'a RoomId, &'a UserId);
|
||||
|
||||
impl crate::Service for Service {
|
||||
fn build(args: crate::Args<'_>) -> Result<Arc<Self>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue