Page MenuHomePhorge

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

Authored by tusooa on Aug 11 2024, 6:37 AM.

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