@@ -64,7 +64,11 @@ Controller::Controller(QObject *parent)
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
auto c = new NeoChatConnection(this);
|
auto c = new NeoChatConnection(this);
|
||||||
|
#if Quotient_VERSION_MINOR > 8
|
||||||
|
c->assumeIdentity(QStringLiteral("@user:localhost:1234"), QStringLiteral("device_1234"), QStringLiteral("token_1234"));
|
||||||
|
#else
|
||||||
c->assumeIdentity(QStringLiteral("@user:localhost:1234"), QStringLiteral("token_1234"));
|
c->assumeIdentity(QStringLiteral("@user:localhost:1234"), QStringLiteral("token_1234"));
|
||||||
|
#endif
|
||||||
connect(c, &Connection::connected, this, [c, this]() {
|
connect(c, &Connection::connected, this, [c, this]() {
|
||||||
m_accountRegistry.add(c);
|
m_accountRegistry.add(c);
|
||||||
c->syncLoop();
|
c->syncLoop();
|
||||||
@@ -224,7 +228,11 @@ void Controller::invokeLogin()
|
|||||||
connect(connection, &NeoChatConnection::networkError, this, [this](const QString &error, const QString &, int, int) {
|
connect(connection, &NeoChatConnection::networkError, this, [this](const QString &error, const QString &, int, int) {
|
||||||
Q_EMIT errorOccured(i18n("Network Error: %1", error), {});
|
Q_EMIT errorOccured(i18n("Network Error: %1", error), {});
|
||||||
});
|
});
|
||||||
|
#if Quotient_VERSION_MINOR > 8
|
||||||
|
connection->assumeIdentity(account.userId(), account.deviceId(), accessToken);
|
||||||
|
#else
|
||||||
connection->assumeIdentity(account.userId(), accessToken);
|
connection->assumeIdentity(account.userId(), accessToken);
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user