Commit 9e87ce6e authored by armin's avatar armin
Browse files

Merge branch 'smallfix' into 'master'

fixes mergeconflict

See merge request !110
parents 541fa26a 31aba13a
......@@ -766,7 +766,6 @@ void RocketChatServerData::loginWithToken( const QString &pUsername, const QStri
self->mStorage->setUserData( self->mUsername, "" );
self->mStorage->setToken( self->mResumeToken, self->mTokenExpire );
self->mStorage->setUserId( self->mUserId );
self->mStorage->commit();
self->onResume();
self->onDDPAuthenticated();
} else {
......@@ -862,7 +861,7 @@ void RocketChatServerData::loginWtihSamlToken( const QString &pToken )
self->mStorage->setUserData( self->mUsername, "" );
self->mStorage->setToken( self->mResumeToken, self->mTokenExpire );
self->mStorage->setUserId( self->mUserId );
self->mStorage->commit();
self->mStorage->askForcommit();
self->onResume();
self->onDDPAuthenticated();
} else {
......@@ -941,7 +940,7 @@ void RocketChatServerData::loginWithOpenIDToken( const QString &pToken, const QS
self->mStorage->setUserData( self->mUsername, "" );
self->mStorage->setToken( self->mResumeToken, self->mTokenExpire );
self->mStorage->setUserId( self->mUserId );
self->mStorage->commit();
self->mStorage->askForcommit();
self->onResume();
self->onDDPAuthenticated();
}
......@@ -2103,16 +2102,18 @@ void RocketChatServerData::createPublicGroup( const QString &pChannelName, const
DdpCallback errorFunc = [ = ]( QJsonObject object, MeteorDDP * ) {
QString reason;
QJsonObject errorObject = object["error"].toObject();
if(errorObject.contains("reason")){
if(errorObject.contains("reason")){
if ( errorObject.contains( "reason" ) ) {
if ( errorObject.contains( "reason" ) ) {
reason = errorObject["reason"].toString();
}
}
emit error(tr("Room creation failed. ")+reason);
emit error( tr( "Room creation failed. " ) + reason );
return;
};
auto request = QSharedPointer<RocketChatCreatePublicGroupRequest>::create( pChannelName, pUsers, pReadonly,success );
request->setError(errorFunc);
auto request = QSharedPointer<RocketChatCreatePublicGroupRequest>::create( pChannelName, pUsers, pReadonly, success );
request->setError( errorFunc );
sendDdprequest( request );
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment