[ADD/WIP] Set is_direct field in room leaves

This commit is contained in:
lda 2024-05-21 11:17:57 +02:00
parent c22d628c86
commit 879e51c169

View file

@ -209,7 +209,6 @@ RoomPopulate(Room *room, User *user, RoomCreateRequest *req, ServerPart s)
SetIfExistent(join_rules);
SetIfExistent(history_visibility);
SetIfExistent(guest_access);
/* TODO: On a trusted room, set invitees PLs to the owner's. */
#undef SetIfExistent
/* User-provided initial states */
@ -303,6 +302,10 @@ RoomPopulate(Room *room, User *user, RoomCreateRequest *req, ServerPart s)
}
}
JsonValueFree(JsonSet(
DbJson(room->leaves_ref),
JsonValueBoolean(req->is_direct), 1, "is_direct"));
event = RoomEventCreate(sender_str, "m.room.power_levels", "", pl_content);
JsonFree(RoomEventSend(room, event));
JsonFree(event);