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:
@@ -60,6 +60,11 @@ void CommonRoomsModel::reload()
|
|||||||
return;
|
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) {
|
m_connection->callApi<NeochatGetCommonRoomsJob>(m_userId).then([this](const auto job) {
|
||||||
const auto &replyData = job->jsonData();
|
const auto &replyData = job->jsonData();
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
|
|||||||
Reference in New Issue
Block a user