Commit b4fd6f2f authored by Martin Klapetek's avatar Martin Klapetek Committed by Alexander Akulich
Browse files

Implement operator==() for KTp::Message to allow comparing messages


Reviewed-by: Alexander Akulich's avatarAlexander Akulich <akulichalexander@gmail.com>
parent 68822d1e
......@@ -214,3 +214,10 @@ KTp::Message::MessageDirection Message::direction() const
{
return d->direction;
}
bool KTp::Message::operator==(const KTp::Message &other) const
{
return mainMessagePart() == other.mainMessagePart()
&& time() == other.time()
&& senderId() == other.senderId();
}
......@@ -153,6 +153,8 @@ public:
MessageDirection direction() const;
bool operator==(const KTp::Message &other) const;
protected:
class Private;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment