Skip to main content

matrix_sdk_base/response_processors/
mod.rs

1// Copyright 2025 The Matrix.org Foundation C.I.C.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15pub mod account_data;
16pub mod changes;
17#[cfg(feature = "e2e-encryption")]
18pub mod e2ee;
19pub mod ephemeral_events;
20pub mod notification;
21pub mod profiles;
22pub mod room;
23pub mod state_events;
24pub mod timeline;
25#[cfg(feature = "e2e-encryption")]
26pub mod verification;
27
28use std::collections::BTreeMap;
29
30use ruma::OwnedRoomId;
31
32use crate::{RoomInfoNotableUpdateReasons, StateChanges};
33
34type RoomInfoNotableUpdates = BTreeMap<OwnedRoomId, RoomInfoNotableUpdateReasons>;
35
36#[cfg_attr(test, derive(Clone))]
37#[derive(Default)]
38pub(crate) struct Context {
39    pub(super) state_changes: StateChanges,
40    pub(super) room_info_notable_updates: RoomInfoNotableUpdates,
41}
42
43impl Context {
44    pub fn new(state_changes: StateChanges) -> Self {
45        Self { state_changes, room_info_notable_updates: Default::default() }
46    }
47}