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
Unknown Object (File)
Tue, Sep 10, 2:04 PM
Unknown Object (File)
Fri, Sep 6, 12:22 PM
Unknown Object (File)
Wed, Sep 4, 5:23 AM
Unknown Object (File)
Tue, Sep 3, 4:06 AM
Unknown Object (File)
Tue, Sep 3, 12:43 AM
Unknown Object (File)
Mon, Sep 2, 9:40 PM
Unknown Object (File)
Sun, Sep 1, 9:23 AM
Unknown Object (File)
Sat, Aug 31, 2:41 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
Branch
tusooa/stacked
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 261
Build 510: GitLab CI for libkazv
Build 509: arc lint + arc unit