Skip to content
Snippets Groups Projects

Design

Merged Armin Felder requested to merge design into master
3 files
+ 126
0
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -19,23 +19,27 @@
********************************************************************************************/
#include "rocketchatchangeuserpresancedefaultstatus.h"
#include "rocketchatchangeuserpresencedefaultstatus.h"
#include "repos/entities/rocketchatuser.h"
RocketChatChangeUserPresanceDefaultStatus::RocketChatChangeUserPresanceDefaultStatus( const status &pStatus )
RocketChatChangeUserPresenceDefaultStatus::RocketChatChangeUserPresenceDefaultStatus( const RocketChatUser::status &pStatus )
{
QJsonArray params;
QString statusText;
if ( pStatus == status::AWAY ) {
if ( pStatus == RocketChatUser::status::AWAY ) {
statusText = QStringLiteral( "away" );
} else if ( pStatus == status::ONLINE ) {
} else if ( pStatus == RocketChatUser::status::ONLINE ) {
statusText = QStringLiteral( "online" );
} else if ( pStatus == status::OFFLINE ) {
} else if ( pStatus == RocketChatUser::status::OFFLINE ) {
statusText = QStringLiteral( "offline" );
} else if ( pStatus == RocketChatUser::status::BUSY ) {
statusText = QStringLiteral( "busy" );
}
params.append( statusText );
buildRequest( QStringLiteral( "UserPresence:setDefaultStatus" ), params );
}
Loading