mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
review
This commit is contained in:
parent
e537fca186
commit
d91719b31e
5 changed files with 13 additions and 9 deletions
|
@ -98,6 +98,7 @@ public:
|
|||
/// Removes all messages from this channel and invokes #messagesCleared
|
||||
void clearMessages();
|
||||
|
||||
[[deprecated("Use findMessageByID instead")]]
|
||||
MessagePtr findMessage(QString messageID);
|
||||
MessagePtr findMessageByID(QStringView messageID) final;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "messages/MessageFlag.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class QStringView;
|
||||
class QTime;
|
||||
|
|
|
@ -369,8 +369,8 @@ void IrcMessageHandler::parsePrivMessageInto(
|
|||
}
|
||||
|
||||
addMessage(message, sink, channel,
|
||||
unescapeZeroWidthJoiner(message->content()), false,
|
||||
message->isAction());
|
||||
unescapeZeroWidthJoiner(message->content()),
|
||||
*getApp()->getTwitch(), false, message->isAction());
|
||||
|
||||
if (message->tags().contains(u"pinned-chat-paid-amount"_s))
|
||||
{
|
||||
|
@ -675,7 +675,8 @@ void IrcMessageHandler::parseUserNoticeMessageInto(Communi::IrcMessage *message,
|
|||
// Messages are not required, so they might be empty
|
||||
if (!content.isEmpty())
|
||||
{
|
||||
addMessage(message, sink, channel, content, true, false);
|
||||
addMessage(message, sink, channel, content, *getApp()->getTwitch(),
|
||||
true, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -956,7 +957,8 @@ void IrcMessageHandler::handlePartMessage(Communi::IrcMessage *message)
|
|||
|
||||
void IrcMessageHandler::addMessage(Communi::IrcMessage *message,
|
||||
MessageSink &sink, TwitchChannel *channel,
|
||||
const QString &originalContent, bool isSub,
|
||||
const QString &originalContent,
|
||||
ITwitchIrcServer &twitch, bool isSub,
|
||||
bool isAction)
|
||||
{
|
||||
assert(channel);
|
||||
|
@ -1101,8 +1103,8 @@ void IrcMessageHandler::addMessage(Communi::IrcMessage *message,
|
|||
if (highlighted && showInMentions &&
|
||||
sink.sinkTraits().has(MessageSinkTrait::AddMentionsToGlobalChannel))
|
||||
{
|
||||
getApp()->getTwitch()->getMentionsChannel()->addMessage(
|
||||
msg, MessageContext::Original);
|
||||
twitch.getMentionsChannel()->addMessage(msg,
|
||||
MessageContext::Original);
|
||||
}
|
||||
|
||||
sink.addMessage(msg, MessageContext::Original);
|
||||
|
|
|
@ -61,8 +61,8 @@ public:
|
|||
|
||||
static void addMessage(Communi::IrcMessage *message, MessageSink &sink,
|
||||
TwitchChannel *channel,
|
||||
const QString &originalContent, bool isSub,
|
||||
bool isAction);
|
||||
const QString &originalContent,
|
||||
ITwitchIrcServer &twitch, bool isSub, bool isAction);
|
||||
|
||||
private:
|
||||
static float similarity(const MessagePtr &msg,
|
||||
|
|
|
@ -453,7 +453,7 @@ void TwitchChannel::addChannelPointReward(const ChannelPointReward &reward)
|
|||
{
|
||||
IrcMessageHandler::instance().addMessage(
|
||||
msg.message.get(), *this, this, msg.originalContent,
|
||||
false, false);
|
||||
*server, false, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue