Skip to content

Commit

Permalink
The client now sends the old roomID when updating. It is used by the …
Browse files Browse the repository at this point in the history
…server to check if it is active.
  • Loading branch information
Feqzz committed Aug 15, 2020
1 parent 1837f11 commit ab2a10e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion handlers/userhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ bool UserHandler::getPersonalRoom()
}
return false;
}

/**
* @brief UserHandler::updatePersonalRoom
* @param roomId
* @param roomPassword
* @return
*/
bool UserHandler::updatePersonalRoom(const QString& roomId, const QString& roomPassword)
{
if (roomId.length() == 0 || roomPassword.length() == 0)
Expand All @@ -110,6 +115,8 @@ bool UserHandler::updatePersonalRoom(const QString& roomId, const QString& roomP
vars.append(roomId);
vars.append(roomPassword);
vars.append(QString::number(mUserId));
//The old roomID is used to check if the room is currently active.
vars.append(mPersonalRoomId);
const int numberOfRowsAffected = mServerTcpQueries->serverQuery(7, vars)[0].toInt();
if(numberOfRowsAffected <= 0)
{
Expand Down

0 comments on commit ab2a10e

Please sign in to comment.