mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
add username to message (simple)
This commit is contained in:
parent
f7318a26e3
commit
5839b9f522
|
@ -37,7 +37,7 @@ void Channel::append(std::shared_ptr<messages::Message> message)
|
|||
str.append('[');
|
||||
str.append(now.toString("HH:mm:ss"));
|
||||
str.append("] ");
|
||||
str.append(message->getUserName());
|
||||
str.append(message->username);
|
||||
str.append(": ");
|
||||
str.append(message->getContent());
|
||||
str.append('\n');
|
||||
|
|
|
@ -36,11 +36,6 @@ int Message::getTimeoutCount() const
|
|||
return this->timeoutCount;
|
||||
}
|
||||
|
||||
const QString &Message::getUserName() const
|
||||
{
|
||||
return this->userName;
|
||||
}
|
||||
|
||||
const QString &Message::getDisplayName() const
|
||||
{
|
||||
return this->displayName;
|
||||
|
|
|
@ -22,7 +22,6 @@ public:
|
|||
void setHighlight(bool value);
|
||||
const QString &getTimeoutUser() const;
|
||||
int getTimeoutCount() const;
|
||||
const QString &getUserName() const;
|
||||
const QString &getDisplayName() const;
|
||||
const QString &getContent() const;
|
||||
const std::chrono::time_point<std::chrono::system_clock> &getParseTime() const;
|
||||
|
@ -30,6 +29,8 @@ public:
|
|||
bool isDisabled() const;
|
||||
const QString &getId() const;
|
||||
|
||||
QString username;
|
||||
|
||||
const QString text;
|
||||
bool centered = false;
|
||||
|
||||
|
@ -57,7 +58,6 @@ private:
|
|||
bool disabled = false;
|
||||
std::chrono::time_point<std::chrono::system_clock> parseTime;
|
||||
|
||||
QString userName = "";
|
||||
QString displayName = "";
|
||||
QString content;
|
||||
QString id = "";
|
||||
|
|
|
@ -26,8 +26,10 @@ public:
|
|||
|
||||
QString originalMessage;
|
||||
|
||||
private:
|
||||
protected:
|
||||
std::shared_ptr<messages::Message> message;
|
||||
|
||||
private:
|
||||
std::vector<Word> _words;
|
||||
bool highlight = false;
|
||||
std::chrono::time_point<std::chrono::system_clock> _parseTime;
|
||||
|
|
|
@ -287,6 +287,8 @@ void TwitchMessageBuilder::parseUsername()
|
|||
if (this->userName.isEmpty()) {
|
||||
this->userName = this->tags.value(QLatin1String("login")).toString();
|
||||
}
|
||||
|
||||
this->message->username = this->userName;
|
||||
}
|
||||
|
||||
void TwitchMessageBuilder::appendUsername()
|
||||
|
|
Loading…
Reference in a new issue