mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: Only allow private read receipts when suspended
This commit is contained in:
1 parent
08527a2880
commit
1124097bd1
1 file changed
+7
-2
@@ -58,14 +58,18 @@ pub(crate) async fn set_read_marker_route(
|
||||
}
|
||||
|
||||
if let Some(event) = &body.read_receipt {
|
||||
if !services.users.is_suspended(sender_user).await? {
|
||||
let receipt_content = BTreeMap::from_iter([(
|
||||
event.to_owned(),
|
||||
BTreeMap::from_iter([(
|
||||
ReceiptType::Read,
|
||||
BTreeMap::from_iter([(sender_user.to_owned(), ruma::events::receipt::Receipt {
|
||||
BTreeMap::from_iter([(
|
||||
sender_user.to_owned(),
|
||||
ruma::events::receipt::Receipt {
|
||||
ts: Some(MilliSecondsSinceUnixEpoch::now()),
|
||||
thread: ReceiptThread::Unthreaded,
|
||||
})]),
|
||||
},
|
||||
)]),
|
||||
)]),
|
||||
)]);
|
||||
|
||||
@@ -82,6 +86,7 @@ pub(crate) async fn set_read_marker_route(
|
||||
)
|
||||
.await;
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(event) = &body.private_read_receipt {
|
||||
let count = services
|
||||
|
||||
Reference in new issue
Block a user