Prevent new packs from overwriting the default pack by accident

This commit is contained in:
Nicolas Werner 2023-05-19 23:06:14 +02:00
parent 4bf725379a
commit 7fab9a1d73
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 47 additions and 1 deletions

View file

@ -82,8 +82,10 @@ SingleImagePackModel *
ImagePackListModel::newPack(bool inRoom)
{
ImagePackInfo info{};
if (inRoom)
if (inRoom) {
info.source_room = room_id;
info.state_key = SingleImagePackModel::unconflictingStatekey(room_id, "");
}
return new SingleImagePackModel(info);
}