mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
parse emojis in whispers
This commit is contained in:
parent
c8f85b7755
commit
8adb2d340d
|
@ -177,8 +177,9 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel,
|
||||||
}
|
}
|
||||||
} // bttv/ffz emote
|
} // bttv/ffz emote
|
||||||
{ // emoji/text
|
{ // emoji/text
|
||||||
for (auto &variant :
|
for (auto &variant : app->emotes->emojis.parse(
|
||||||
app->emotes->emojis.parse(words[i])) {
|
app->emotes->emojis.replaceShortCodes(
|
||||||
|
words[i]))) {
|
||||||
constexpr const static struct {
|
constexpr const static struct {
|
||||||
void operator()(EmotePtr emote,
|
void operator()(EmotePtr emote,
|
||||||
MessageBuilder &b) const
|
MessageBuilder &b) const
|
||||||
|
@ -197,19 +198,20 @@ QString CommandController::execCommand(const QString &text, ChannelPtr channel,
|
||||||
[&b](auto &&arg) { visitor(arg, b); }, variant);
|
[&b](auto &&arg) { visitor(arg, b); }, variant);
|
||||||
} // emoji/text
|
} // emoji/text
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
b->flags.set(MessageFlag::DoNotTriggerNotification);
|
b->flags.set(MessageFlag::DoNotTriggerNotification);
|
||||||
auto messagexD = b.release();
|
auto messagexD = b.release();
|
||||||
|
|
||||||
app->twitch.server->whispersChannel->addMessage(messagexD);
|
app->twitch.server->whispersChannel->addMessage(messagexD);
|
||||||
|
|
||||||
app->twitch.server->sendMessage("jtv", text);
|
app->twitch.server->sendMessage("jtv", text);
|
||||||
|
|
||||||
if (getSettings()->inlineWhispers) {
|
if (getSettings()->inlineWhispers) {
|
||||||
app->twitch.server->forEachChannel(
|
app->twitch.server->forEachChannel(
|
||||||
[&messagexD](ChannelPtr _channel) {
|
[&messagexD](ChannelPtr _channel) {
|
||||||
_channel->addMessage(messagexD);
|
_channel->addMessage(messagexD);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Reference in a new issue