removed own VCard request at the start if the presence doesn't show that the avatar changed, little refactoring

This commit is contained in:
Blue 2022-08-27 14:39:24 +03:00
parent 7b2b7ee5d5
commit b6ba022bff
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
10 changed files with 215 additions and 129 deletions

View file

@ -52,6 +52,7 @@
#include "handlers/messagehandler.h"
#include "handlers/rosterhandler.h"
#include "handlers/vcardhandler.h"
#include "handlers/discoveryhandler.h"
namespace Core
{
@ -62,6 +63,7 @@ class Account : public QObject
friend class MessageHandler;
friend class RosterHandler;
friend class VCardHandler;
friend class DiscoveryHandler;
public:
enum class Error {
authentication,
@ -156,6 +158,7 @@ signals:
void uploadFileError(const QString& jid, const QString& messageId, const QString& error);
void needPassword();
void infoDiscovered(const QString& address, const QString& node, const std::set<Shared::Identity>& identities, const std::set<QString>& features);
void pepSupportChanged(Shared::Support support);
private:
QString name;
@ -179,13 +182,14 @@ private:
NetworkAccess* network;
Shared::AccountPassword passwordType;
Error lastError;
bool pepSupport;
Shared::Support pepSupport;
bool active;
bool notReadyPassword;
MessageHandler* mh;
RosterHandler* rh;
VCardHandler* vh;
DiscoveryHandler* dh;
private slots:
void onClientStateChange(QXmppClient::State state);
@ -199,13 +203,12 @@ private slots:
void onMamLog(QXmppLogger::MessageType type, const QString &msg);
void onDiscoveryItemsReceived (const QXmppDiscoveryIq& items);
void onDiscoveryInfoReceived (const QXmppDiscoveryIq& info);
void onContactHistoryResponse(const std::list<Shared::Message>& list, bool last);
private:
void handleDisconnection();
void onReconnectTimer();
void setPepSupport(Shared::Support support);
};
}