mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-26 07:19:22 +00:00
Fix bad refresh
This commit is contained in:
parent
7f9e2549a2
commit
cbb12a87e1
@ -216,11 +216,11 @@ pub fn refresh_single(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
|
|
||||||
messages.sort_by(|one, two| one.id.cmp(&two.id));
|
messages.sort_by(|one, two| one.id.cmp(&two.id));
|
||||||
|
|
||||||
if messages.len() > 0 {
|
if messages.len() > 0 && messages.last().unwrap().id > conv.last_message_seen {
|
||||||
conversations_helper::mark_user_seen(
|
conversations_helper::mark_user_seen(
|
||||||
conv.conv_id,
|
conv.conv_id,
|
||||||
r.user_id_ref()?,
|
r.user_id_ref()?,
|
||||||
&messages[messages.len() - 1],
|
&messages.last().unwrap(),
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user