fix: element android did not reset notification counts
This commit is contained in:
parent
e86fb11512
commit
02dd3d32f2
7 changed files with 40 additions and 14 deletions
|
@ -4,8 +4,8 @@ use ruma::{
|
|||
api::client::{
|
||||
account::{
|
||||
change_password, deactivate, get_3pids, get_username_availability, register,
|
||||
request_3pid_management_token_via_email, request_3pid_management_token_via_msisdn, whoami,
|
||||
ThirdPartyIdRemovalStatus,
|
||||
request_3pid_management_token_via_email, request_3pid_management_token_via_msisdn,
|
||||
whoami, ThirdPartyIdRemovalStatus,
|
||||
},
|
||||
error::ErrorKind,
|
||||
uiaa::{AuthFlow, AuthType, UiaaInfo},
|
||||
|
|
|
@ -87,10 +87,7 @@ pub async fn set_room_visibility_route(
|
|||
|
||||
if !services().rooms.metadata.exists(&body.room_id)? {
|
||||
// Return 404 if the room doesn't exist
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::NotFound,
|
||||
"Room not found",
|
||||
));
|
||||
return Err(Error::BadRequest(ErrorKind::NotFound, "Room not found"));
|
||||
}
|
||||
|
||||
match &body.visibility {
|
||||
|
@ -116,13 +113,9 @@ pub async fn set_room_visibility_route(
|
|||
pub async fn get_room_visibility_route(
|
||||
body: Ruma<get_room_visibility::v3::IncomingRequest>,
|
||||
) -> Result<get_room_visibility::v3::Response> {
|
||||
|
||||
if !services().rooms.metadata.exists(&body.room_id)? {
|
||||
// Return 404 if the room doesn't exist
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::NotFound,
|
||||
"Room not found",
|
||||
));
|
||||
return Err(Error::BadRequest(ErrorKind::NotFound, "Room not found"));
|
||||
}
|
||||
|
||||
Ok(get_room_visibility::v3::Response {
|
||||
|
|
|
@ -282,9 +282,8 @@ async fn sync_helper(
|
|||
let send_notification_counts = !timeline_pdus.is_empty()
|
||||
|| services()
|
||||
.rooms
|
||||
.edus
|
||||
.read_receipt
|
||||
.last_privateread_update(&sender_user, &room_id)?
|
||||
.user
|
||||
.last_notification_read(&sender_user, &room_id)?
|
||||
> since;
|
||||
|
||||
let mut timeline_users = HashSet::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue