aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/connection.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index d92071df..6c04cf08 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -465,9 +465,12 @@ CreateRoomJob* Connection::createRoom(RoomVisibility visibility,
const QVector<CreateRoomJob::Invite3pid>& invite3pids,
const QJsonObject& creationContent)
{
+ // FIXME: switch to using QStringList instead of const QStringList& in 0.4
+ auto filteredInvites = invites;
+ filteredInvites.removeOne(d->userId); // The creator is by definition in the room
auto job = callApi<CreateRoomJob>(
visibility == PublishRoom ? "public" : "private", alias, name,
- topic, invites, invite3pids, creationContent, initialState,
+ topic, filteredInvites, invite3pids, creationContent, initialState,
presetName, isDirect, guestsCanJoin);
connect(job, &BaseJob::success, this, [this,job] {
emit createdRoom(provideRoom(job->roomId(), JoinState::Join));