diff --git a/src/messages/layouts/MessageLayoutElement.cpp b/src/messages/layouts/MessageLayoutElement.cpp index 385451141..8a683a391 100644 --- a/src/messages/layouts/MessageLayoutElement.cpp +++ b/src/messages/layouts/MessageLayoutElement.cpp @@ -1,6 +1,7 @@ #include "messages/layouts/MessageLayoutElement.hpp" #include "Application.hpp" +#include "messages/Emote.hpp" #include "messages/Image.hpp" #include "messages/MessageElement.hpp" #include "singletons/Theme.hpp" @@ -77,11 +78,12 @@ ImageLayoutElement::ImageLayoutElement(MessageElement &creator, ImagePtr image, void ImageLayoutElement::addCopyTextToString(QString &str, int from, int to) const { - // str += this->image_->getCopyString(); - str += "not implemented"; - - if (this->hasTrailingSpace()) { - str += " "; + const auto *emoteElement = dynamic_cast(&this->getCreator()); + if (emoteElement) { + str += emoteElement->getEmote()->getCopyString(); + if (this->hasTrailingSpace()) { + str += " "; + } } }