#pragma once #include "messages/word.hpp" #include #include #include namespace chatterino { class Channel; namespace messages { class Message; typedef std::shared_ptr SharedMessage; class Message { public: bool containsHighlightedPhrase() const; void setHighlight(bool value); const QString &getTimeoutUser() const; int getTimeoutCount() const; const QString &getContent() const; const std::chrono::time_point &getParseTime() const; std::vector &getWords(); bool isDisabled() const; void setDisabled(bool value); const QString &getId() const; bool getCollapsedDefault() const; void setCollapsedDefault(bool value); QString loginName; QString displayName; QString localizedName; QString timeoutUser; const QString text; bool centered = false; static Message *createSystemMessage(const QString &text); static Message *createTimeoutMessage(const QString &username, const QString &durationInSeconds, const QString &reason); private: static LazyLoadedImage *badgeStaff; static LazyLoadedImage *badgeAdmin; static LazyLoadedImage *badgeGlobalmod; static LazyLoadedImage *badgeModerator; static LazyLoadedImage *badgeTurbo; static LazyLoadedImage *badgeBroadcaster; static LazyLoadedImage *badgePremium; static QRegularExpression *cheerRegex; // what is highlightTab? bool highlightTab = false; int timeoutCount = 0; bool disabled = false; bool collapsedDefault = false; std::chrono::time_point parseTime; QString content; QString id = ""; std::vector words; }; } // namespace messages } // namespace chatterino