Page MenuHomePhorge

Fix gap incorrectly introduced when limited field is missing from sync
ClosedPublic

Authored by tusooa on Aug 11 2024, 6:37 AM.
Tags
None
Referenced Files
F114062: D163.1732503678.diff
Sat, Nov 23, 7:01 PM
F113983: D163.1732499726.diff
Sat, Nov 23, 5:55 PM
F113982: D163.1732499723.diff
Sat, Nov 23, 5:55 PM
F113799: D163.1732489075.diff
Sat, Nov 23, 2:57 PM
Subscribers
None

Details

Summary

conduwuit does not return limited field from sync if it is not limited. This conforms to the matrix spec because it says this field is optional, and it should be considered limited when "its value is true." libkazv incorrectly assumed this field is present for all sync responses. This caused it to make a gap at the start of the sync batch, and incorrectly try paginate back. If this is an encrypted room, paginating back will cause the previous events to be returned again, erasing the originally decrypted content.

Type: fix

BUG: https://iron.lily-is.land/T134

Test Plan

Build kazv against this. Send a message in an encrypted room. Verify that previous messages does not go undecrypted.

Diff Detail

Repository
rL libkazv
Lint
Lint Not Applicable
Unit
Tests Not Applicable