some thoughts on detecting condition for enablining or showing the button for encryption in chat window
This commit is contained in:
parent
21b40a9ccb
commit
283e9ebc4d
11 changed files with 269 additions and 17 deletions
|
@ -120,6 +120,8 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
QObject::connect(delay, &DelayManager::Manager::requestBundles, oh, &OmemoHandler::requestBundles);
|
||||
QObject::connect(delay, &DelayManager::Manager::requestOwnBundles, oh, &OmemoHandler::requestOwnBundles);
|
||||
|
||||
QObject::connect(om, &QXmppOmemoManager::deviceAdded, oh, &OmemoHandler::onOmemoDeviceAdded);
|
||||
|
||||
client.addExtension(tm);
|
||||
client.addExtension(om);
|
||||
om->setSecurityPolicy(QXmpp::Toakafa);
|
||||
|
|
|
@ -214,6 +214,10 @@ void Core::OmemoHandler::onOwnBundlesReceived() {
|
|||
acc->delay->receivedOwnBundles(keys);
|
||||
}
|
||||
|
||||
void Core::OmemoHandler::onOmemoDeviceAdded(const QString& jid, uint32_t id) {
|
||||
qDebug() << "OMEMO device added for" << jid;
|
||||
}
|
||||
|
||||
|
||||
QDataStream & operator >> (QDataStream& in, QXmppOmemoStorage::Device& device) {
|
||||
in >> device.label;
|
||||
|
|
|
@ -64,6 +64,9 @@ public:
|
|||
void requestOwnBundles();
|
||||
void getDevices(const QString& jid, std::list<Shared::KeyInfo>& out) const;
|
||||
|
||||
public slots:
|
||||
void onOmemoDeviceAdded(const QString& jid, uint32_t id);
|
||||
|
||||
private slots:
|
||||
void onBundlesReceived(const QString& jid);
|
||||
void onOwnBundlesReceived();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue