Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chat
RocketChatMobileEngine
Commits
8c2efd6e
Commit
8c2efd6e
authored
Jan 11, 2019
by
Dennis Beier
Browse files
added error when room cannot be created
parent
ecd665ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
rocketchatserver.cpp
View file @
8c2efd6e
...
...
@@ -2040,7 +2040,19 @@ void RocketChatServerData::createPublicGroup( const QString &pChannelName, const
}
}
};
auto
request
=
QSharedPointer
<
RocketChatCreatePublicGroupRequest
>::
create
(
pChannelName
,
pUsers
,
pReadonly
);
DdpCallback
errorFunc
=
[
=
](
QJsonObject
object
,
MeteorDDP
*
)
{
QString
reason
;
QJsonObject
errorObject
=
object
[
"error"
].
toObject
();
if
(
errorObject
.
contains
(
"reason"
)){
if
(
errorObject
.
contains
(
"reason"
)){
reason
=
errorObject
[
"reason"
].
toString
();
}
}
emit
error
(
tr
(
"Room creation failed. "
)
+
reason
);
return
;
};
auto
request
=
QSharedPointer
<
RocketChatCreatePublicGroupRequest
>::
create
(
pChannelName
,
pUsers
,
pReadonly
,
success
);
request
->
setError
(
errorFunc
);
sendDdprequest
(
request
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment