fix: set limited to true when skipping messages in /sync

This commit is contained in:
Timo 2020-08-19 18:26:39 +02:00
parent e457e19088
commit f23fb32e95
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
5 changed files with 24 additions and 10 deletions

View file

@ -575,7 +575,7 @@ impl Rooms {
self.roomstateid_pdu.insert(key, &*pdu_json.to_string())?;
}
match dbg!(event_type) {
match event_type {
EventType::RoomRedaction => {
if let Some(redact_id) = &redacts {
// TODO: Reason
@ -619,7 +619,7 @@ impl Rooms {
}
}
EventType::RoomMessage => {
if let Some(body) = dbg!(content).get("body").and_then(|b| b.as_str()) {
if let Some(body) = content.get("body").and_then(|b| b.as_str()) {
for word in body
.split_terminator(|c: char| !c.is_alphanumeric())
.map(str::to_lowercase)
@ -1002,7 +1002,7 @@ impl Rooms {
.iter_mut()
.map(|it| {
while let Some(element) = it.peek() {
if dbg!(element) > dbg!(target) {
if element > target {
return false;
} else if element == target {
return true;