Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RocketChatMobileEngine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
hosting
chat
RocketChatMobileEngine
Merge requests
!61
Design
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Design
design
into
master
Overview
0
Commits
10
Pipelines
0
Changes
3
Merged
Armin Felder
requested to merge
design
into
master
6 years ago
Overview
0
Commits
10
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Viewing commit
7d69e159
Prev
Next
Show latest version
3 files
+
126
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
7d69e159
missing ddp methods
· 7d69e159
Armin Felder
authored
6 years ago
ddpRequests/rocketchatchangeuserpresencedefaultstatus.cpp
0 → 100644
+
45
−
0
Options
/********************************************************************************************
* *
* Copyright (C) 2017 Armin Felder, Dennis Beier *
* This file is part of RocketChatMobileEngine <https://git.fairkom.net/chat/fairchat>. *
* *
* RocketChatMobileEngine is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* RocketChatMobileEngine is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with RocketChatMobileEngine. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************************/
#include
"rocketchatchangeuserpresencedefaultstatus.h"
#include
"repos/entities/rocketchatuser.h"
RocketChatChangeUserPresenceDefaultStatus
::
RocketChatChangeUserPresenceDefaultStatus
(
const
RocketChatUser
::
status
&
pStatus
)
{
QJsonArray
params
;
QString
statusText
;
if
(
pStatus
==
RocketChatUser
::
status
::
AWAY
)
{
statusText
=
QStringLiteral
(
"away"
);
}
else
if
(
pStatus
==
RocketChatUser
::
status
::
ONLINE
)
{
statusText
=
QStringLiteral
(
"online"
);
}
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