diff options
author | Vitaly Takmazov <vitalyster@gmail.com> | 2022-02-14 06:00:59 +0300 |
---|---|---|
committer | Vitaly Takmazov <vitalyster@gmail.com> | 2022-02-14 06:36:58 +0300 |
commit | 7d7680cce82f1c036f29581cb3163162d3298e96 (patch) | |
tree | 76642579d4d71b26fe89b8b8c23c7737acf94b99 | |
parent | d5e8851daec94a43f7d70627df1ea44b230a44e0 (diff) |
Transport: do not send carbon message copy to the originated entity
-rw-r--r-- | libtransport/Conversation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libtransport/Conversation.cpp b/libtransport/Conversation.cpp index 8f7c6246..336e75e8 100644 --- a/libtransport/Conversation.cpp +++ b/libtransport/Conversation.cpp @@ -264,6 +264,10 @@ void Conversation::forwardAsCarbonSent( const std::shared_ptr<Swift::Message> &payload, const Swift::JID& to) { + if (payload->getFrom().equals(to, Swift::JID::CompareType::WithResource)) { + LOG4CXX_INFO(conversationLogger, "Carbon to " << to.toString() << " skipped (originated entity)"); + return; + } LOG4CXX_INFO(conversationLogger, "Carbon <sent> to -> " << to.toString()); //Message envelope |