mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-06-21 22:58:32 -04:00
chore(base): Move RoomNotificationMode into matrix-sdk-base.
This patch moves the `RoomNotificationMode` type from `matrix-sdk` to `matrix-sdk-base` because it's going to be shared across multiple crates.
This commit is contained in:
committed by
Stefan Ceriu
parent
6becbf61c9
commit
7e2c773d21
@@ -29,6 +29,7 @@ pub mod deserialized_responses;
|
||||
mod error;
|
||||
pub mod latest_event;
|
||||
pub mod media;
|
||||
pub mod notification_settings;
|
||||
mod rooms;
|
||||
|
||||
pub mod read_receipts;
|
||||
|
||||
26
crates/matrix-sdk-base/src/notification_settings.rs
Normal file
26
crates/matrix-sdk-base/src/notification_settings.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for that specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Some shared types about notification settings.
|
||||
|
||||
/// Enum representing the push notification modes for a room.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum RoomNotificationMode {
|
||||
/// Receive notifications for all messages.
|
||||
AllMessages,
|
||||
/// Receive notifications for mentions and keywords only.
|
||||
MentionsAndKeywordsOnly,
|
||||
/// Do not receive any notifications.
|
||||
Mute,
|
||||
}
|
||||
@@ -23,22 +23,13 @@ mod command;
|
||||
mod rule_commands;
|
||||
mod rules;
|
||||
|
||||
pub use matrix_sdk_base::notification_settings::RoomNotificationMode;
|
||||
|
||||
use crate::{
|
||||
config::RequestConfig, error::NotificationSettingsError, event_handler::EventHandlerDropGuard,
|
||||
Client, Result,
|
||||
};
|
||||
|
||||
/// Enum representing the push notification modes for a room.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum RoomNotificationMode {
|
||||
/// Receive notifications for all messages.
|
||||
AllMessages,
|
||||
/// Receive notifications for mentions and keywords only.
|
||||
MentionsAndKeywordsOnly,
|
||||
/// Do not receive any notifications.
|
||||
Mute,
|
||||
}
|
||||
|
||||
/// Whether or not a room is encrypted
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum IsEncrypted {
|
||||
|
||||
Reference in New Issue
Block a user