[ADD/WIP] Set is_direct field in room leaves
Some checks failed
Compile Telodendria / Compile Telodendria (x86, alpine-v3.19) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86, debian-v12.4) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86, freebsd-v14.0) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86, netbsd-v9.3) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86_64, alpine-v3.19) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86_64, debian-v12.4) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86_64, freebsd-v14.0) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86_64, netbsd-v9.3) (push) Has been cancelled
Compile Telodendria / Compile Telodendria (x86_64, openbsd-v7.4) (push) Has been cancelled

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);