summary refs log tree commit diff
path: root/rust/src/matrix_const.rs
diff options
context:
space:
mode:
authorDevon Hudson <devon.dmytro@gmail.com>2024-11-14 16:18:24 +0000
committerGitHub <noreply@github.com>2024-11-14 16:18:24 +0000
commite80dad5fa9ccc9fb7645c043a1e1995065c4bb2a (patch)
treed8944bc79968e6518bc2ab63417623d73732157d /rust/src/matrix_const.rs
parentMerge branch 'master' into develop (diff)
downloadsynapse-e80dad5fa9ccc9fb7645c043a1e1995065c4bb2a.tar.xz
Move server event filtering logic to rust (#17928)
### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [X] Pull request is based on the develop branch
* [X] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [X] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
Diffstat (limited to 'rust/src/matrix_const.rs')
-rw-r--r--rust/src/matrix_const.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/rust/src/matrix_const.rs b/rust/src/matrix_const.rs
new file mode 100644

index 0000000000..f75f3bd7c3 --- /dev/null +++ b/rust/src/matrix_const.rs
@@ -0,0 +1,28 @@ +/* + * This file is licensed under the Affero General Public License (AGPL) version 3. + * + * Copyright (C) 2024 New Vector, Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * See the GNU Affero General Public License for more details: + * <https://www.gnu.org/licenses/agpl-3.0.html>. + */ + +//! # Matrix Constants +//! +//! This module contains definitions for constant values described by the matrix specification. + +pub const HISTORY_VISIBILITY_WORLD_READABLE: &str = "world_readable"; +pub const HISTORY_VISIBILITY_SHARED: &str = "shared"; +pub const HISTORY_VISIBILITY_INVITED: &str = "invited"; +pub const HISTORY_VISIBILITY_JOINED: &str = "joined"; + +pub const MEMBERSHIP_BAN: &str = "ban"; +pub const MEMBERSHIP_LEAVE: &str = "leave"; +pub const MEMBERSHIP_KNOCK: &str = "knock"; +pub const MEMBERSHIP_INVITE: &str = "invite"; +pub const MEMBERSHIP_JOIN: &str = "join";