1
0
Fork 0
forked from blue/squawk

some work towards encryption

This commit is contained in:
Blue 2023-11-04 22:12:15 -03:00
parent 297e08ba41
commit a7d1a28f29
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
21 changed files with 129 additions and 81 deletions

View file

@ -669,6 +669,17 @@ void Core::Account::setRoomJoined(const QString& jid, bool joined) {
conf->setJoined(joined);
}
void Core::Account::setContactEncryption(const QString& jid, Shared::EncryptionProtocol value) {
Contact* cnt = rh->getContact(jid);
if (cnt == nullptr) {
qDebug() << "An attempt to set encryption to the non-existing contact" << jid << "of the account" << getName() << ", skipping";
return;
}
cnt->setEncryption(value);
}
void Core::Account::discoverInfo(const QString& address, const QString& node) {
if (state == Shared::ConnectionState::connected) {
dm->requestInfo(address, node);