Early exit if we're checking mutual rooms with yourself

This is rejected by servers too, so don't even bother doing as it
doesn't make sense.
This commit is contained in:
Joshua Goins
2025-02-22 13:04:39 -05:00
parent dea70152e4
commit 94fdf777cb

View File

@@ -60,6 +60,11 @@ void CommonRoomsModel::reload()
return;
}
// Checking if you have mutual rooms with yourself doesn't make sense and servers reject it too
if (m_connection->userId() == m_userId) {
return;
}
m_connection->callApi<NeochatGetCommonRoomsJob>(m_userId).then([this](const auto job) {
const auto &replyData = job->jsonData();
beginResetModel();