aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/connection.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 6c04cf08..d363b433 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -497,6 +497,9 @@ void Connection::doInDirectChat(const QString& userId,
if (auto r = room(roomId, JoinState::Join))
{
Q_ASSERT(r->id() == roomId);
+ // A direct chat with yourself should only involve yourself :)
+ if (userId == d->userId && r->memberCount() > 1)
+ continue;
qCDebug(MAIN) << "Requested direct chat with" << userId
<< "is already available as" << r->id();
operation(r);