mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
feat: /reply
command now replies to the latest message of the user (#4919)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
1d6c9ed279
commit
9dd83b040b
|
@ -7,6 +7,7 @@
|
|||
- Minor: The account switcher is now styled to match your theme. (#4817)
|
||||
- Minor: Add an invisible resize handle to the bottom of frameless user info popups and reply thread popups. (#4795)
|
||||
- Minor: The installer now checks for the VC Runtime version and shows more info when it's outdated. (#4847)
|
||||
- Minor: The `/reply` command now replies to the latest message of the user. (#4919)
|
||||
- Bugfix: Fixed an issue where certain emojis did not send to Twitch chat correctly. (#4840)
|
||||
- Bugfix: Fixed capitalized channel names in log inclusion list not being logged. (#4848)
|
||||
- Bugfix: Trimmed custom streamlink paths on all platforms making sure you don't accidentally add spaces at the beginning or end of its path. (#4834)
|
||||
|
|
|
@ -1564,20 +1564,16 @@ void CommandController::initialize(Settings &, Paths &paths)
|
|||
const auto &msg = *it;
|
||||
if (msg->loginName.compare(username, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
std::shared_ptr<MessageThread> thread;
|
||||
// found most recent message by user
|
||||
if (msg->replyThread == nullptr)
|
||||
{
|
||||
thread = std::make_shared<MessageThread>(msg);
|
||||
// prepare thread if one does not exist
|
||||
auto thread = std::make_shared<MessageThread>(msg);
|
||||
twitchChannel->addReplyThread(thread);
|
||||
}
|
||||
else
|
||||
{
|
||||
thread = msg->replyThread;
|
||||
}
|
||||
|
||||
QString reply = words.mid(2).join(" ");
|
||||
twitchChannel->sendReply(reply, thread->rootId());
|
||||
twitchChannel->sendReply(reply, msg->id);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue