Commit 4141af83 authored by Benjamin REIS's avatar Benjamin REIS

Do not add me on serverGroupChatRoom

parent c91dc4b5
......@@ -272,8 +272,12 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
if (!chatRoom->canHandleParticipants())
return id;
shared_ptr<Participant> me = chatRoom->getMe();
insertChatRoomParticipant(id, insertSipAddress(me->getAddress().asString()), me->isAdmin());
// 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());
}
for (const auto &participant : chatRoom->getParticipants())
insertChatRoomParticipant(id, insertSipAddress(participant->getAddress().asString()), participant->isAdmin());
......
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