Commit 34a95033 authored by Benjamin REIS's avatar Benjamin REIS
Browse files

Also add 'me' devices of a chatroom (for encryption purposes)

parent 008ec55b
......@@ -275,7 +275,13 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
// Do not add 'me' when creating a server-group-chat-room.
if (chatRoomId.getLocalAddress() != chatRoomId.getPeerAddress()) {
shared_ptr<Participant> me = chatRoom->getMe();
insertChatRoomParticipant(id, insertSipAddress(me->getAddress().asString()), me->isAdmin());
long long meId = insertChatRoomParticipant(
for (const auto &device : me->getPrivate()->getDevices())
insertChatRoomParticipantDevice(meId, insertSipAddress(device->getAddress().asString()));
for (const auto &participant : chatRoom->getParticipants()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment