diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-09-05 20:37:05 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-09-06 00:46:56 +0200 |
| commit | 5f813f8a4bbe1e075daad7b3933829044befffb4 (patch) | |
| tree | 20102aa665b03cfb6dfe0c6ece94938320b6430e /src/client/QXmppCarbonManager.cpp | |
| parent | 4c60b13e0b8011e4e0b093a690e939f3b23e2436 (diff) | |
| download | qxmpp-5f813f8a4bbe1e075daad7b3933829044befffb4.tar.gz | |
Reformat code
Diffstat (limited to 'src/client/QXmppCarbonManager.cpp')
| -rw-r--r-- | src/client/QXmppCarbonManager.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/client/QXmppCarbonManager.cpp b/src/client/QXmppCarbonManager.cpp index fbc2cff1..61a19778 100644 --- a/src/client/QXmppCarbonManager.cpp +++ b/src/client/QXmppCarbonManager.cpp @@ -41,8 +41,9 @@ bool QXmppCarbonManager::carbonsEnabled() const /// void QXmppCarbonManager::setCarbonsEnabled(bool enabled) { - if (m_carbonsEnabled == enabled) + if (m_carbonsEnabled == enabled) { return; + } m_carbonsEnabled = enabled; @@ -65,8 +66,9 @@ QStringList QXmppCarbonManager::discoveryFeatures() const bool QXmppCarbonManager::handleStanza(const QDomElement &element) { - if (element.tagName() != "message") + if (element.tagName() != "message") { return false; + } bool sent = true; QDomElement carbon = element.firstChildElement("sent"); @@ -75,8 +77,9 @@ bool QXmppCarbonManager::handleStanza(const QDomElement &element) sent = false; } - if (carbon.isNull() || carbon.namespaceURI() != ns_carbons) + if (carbon.isNull() || carbon.namespaceURI() != ns_carbons) { return false; + } // carbon copies must always come from our bare JID if (element.attribute("from") != client()->configuration().jidBare()) { @@ -86,17 +89,19 @@ bool QXmppCarbonManager::handleStanza(const QDomElement &element) auto forwarded = carbon.firstChildElement("forwarded"); auto messageElement = forwarded.firstChildElement("message"); - if (messageElement.isNull()) + if (messageElement.isNull()) { return false; + } QXmppMessage message; message.parse(messageElement); message.setCarbonForwarded(true); - if (sent) + if (sent) { emit messageSent(message); - else + } else { emit messageReceived(message); + } return true; } |
