Compare commits
2
Commits
0.5.4
...
20220714-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
692081b7f0 | ||
|
|
943b1f08f0 |
No files matched your search
@@ -52,7 +52,7 @@ mobc-redis = { version = "0.7.0", default-features = false, features = ["async-s
|
|||||||
# web
|
# web
|
||||||
rocket = { version = "0.5.0-rc.2", default-features = false, features = ["json"] }
|
rocket = { version = "0.5.0-rc.2", default-features = false, features = ["json"] }
|
||||||
rocket_empty = { git = "https://github.com/insertish/rocket_empty", branch = "master" }
|
rocket_empty = { git = "https://github.com/insertish/rocket_empty", branch = "master" }
|
||||||
rocket_rauth = { git = "https://github.com/insertish/rauth", rev = "c2acaf6b31213e3969f8b48f9deed3daa125d394" }
|
rocket_rauth = { git = "https://github.com/insertish/rauth", rev = "67a7fa8100c7db8411fb8fb149441418b55c19ef" }
|
||||||
|
|
||||||
# spec generation
|
# spec generation
|
||||||
schemars = "0.8.8"
|
schemars = "0.8.8"
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ rocket_empty = { optional = true, git = "https://github.com/insertish/rocket_emp
|
|||||||
rocket_cors = { optional = true, git = "https://github.com/lawliet89/rocket_cors", rev = "5843861a88958c16bfaa0b40f0d8910772bcd2f6" }
|
rocket_cors = { optional = true, git = "https://github.com/lawliet89/rocket_cors", rev = "5843861a88958c16bfaa0b40f0d8910772bcd2f6" }
|
||||||
|
|
||||||
# rAuth
|
# rAuth
|
||||||
rauth = { git = "https://github.com/insertish/rauth", rev = "c2acaf6b31213e3969f8b48f9deed3daa125d394", features = [ "async-std-runtime" ] }
|
rauth = { git = "https://github.com/insertish/rauth", rev = "67a7fa8100c7db8411fb8fb149441418b55c19ef", features = [ "async-std-runtime" ] }
|
||||||
|
|
||||||
# Sentry
|
# Sentry
|
||||||
sentry = "0.25.0"
|
sentry = "0.25.0"
|
||||||
@@ -110,7 +110,13 @@ async fn calculate_channel_permission(
|
|||||||
|
|
||||||
// 1. Check channel type.
|
// 1. Check channel type.
|
||||||
let value: PermissionValue = match channel {
|
let value: PermissionValue = match channel {
|
||||||
Channel::SavedMessages { .. } => (*DEFAULT_PERMISSION_SAVED_MESSAGES).into(),
|
Channel::SavedMessages { user, .. } => {
|
||||||
|
if user == &data.perspective.id {
|
||||||
|
(*DEFAULT_PERMISSION_SAVED_MESSAGES).into()
|
||||||
|
} else {
|
||||||
|
0_u64.into()
|
||||||
|
}
|
||||||
|
}
|
||||||
Channel::DirectMessage { recipients, .. } => {
|
Channel::DirectMessage { recipients, .. } => {
|
||||||
// 2. Fetch user.
|
// 2. Fetch user.
|
||||||
let other_user = recipients
|
let other_user = recipients
|
||||||
|
|||||||
Reference in new issue
Block a user