Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix encoding issues from dendrite #33

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matrix-common/events.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1786,7 +1786,7 @@ module State_event = struct
let room_event, state_key = v in
{room_event; state_key} in
let with_tuple =
merge_objs Room_event.encoding (obj1 (req "state_key" string)) in
merge_objs Room_event.encoding (obj1 (dft "state_key" string "")) in
conv to_tuple of_tuple with_tuple

let get_event t = Room_event.get_event t.room_event
Expand Down
4 changes: 2 additions & 2 deletions lib/matrix-ctos/rooms.ml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ let encoding =
let with_tuple =
obj3
(req "join" (assoc Joined_room.encoding))
(req "invite" (assoc Invited_room.encoding))
(req "leave" (assoc Left_room.encoding)) in
(dft "invite" (assoc Invited_room.encoding) [])
(dft "leave" (assoc Left_room.encoding) []) in
conv to_tuple of_tuple with_tuple