mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-06 19:25:59 +00:00
Compare commits
1 Commits
0.5.4
...
20220710-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
943b1f08f0 |
@@ -110,7 +110,13 @@ async fn calculate_channel_permission(
|
||||
|
||||
// 1. Check channel type.
|
||||
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, .. } => {
|
||||
// 2. Fetch user.
|
||||
let other_user = recipients
|
||||
|
||||
Reference in New Issue
Block a user