Compare commits

..

3 commits

Author SHA1 Message Date
nerix 4af7210f70
Merge 802edeb8de into 9345050868 2024-10-20 09:09:26 +00:00
Rasmus Karlsson 802edeb8de
nit: check makeIrcMessage return value 2024-10-20 11:09:16 +02:00
Rasmus Karlsson d3eacc5d8d
nit: fix typos 2024-10-20 11:09:12 +02:00
2 changed files with 10 additions and 7 deletions

View file

@ -239,13 +239,13 @@ public:
/// content = "there"
/// messageOffset_ = 4
/// The index 6 would resolve to 6 - 4 = 2 => 'e'
/// @param thread The reply thred this message is part of. If there's no
/// @param thread The reply thread this message is part of. If there's no
/// thread, this is an empty `shared_ptr`.
/// @param parent The direct parent this message is replying to. This does
/// not need to be the `thread`s root. If this message isn't
/// replying to anything, this is an empty `shared_ptr`.
///
/// @returns The built messagae and a highlight result.
/// @returns The built message and a highlight result.
static std::pair<MessagePtrMut, HighlightAlert> makeIrcMessage(
Channel *channel, const Communi::IrcMessage *ircMessage,
const MessageParseArgs &args, QString content,

View file

@ -512,13 +512,16 @@ std::vector<MessagePtr> parseUserNoticeMessage(Channel *channel,
auto [built, highlight] = MessageBuilder::makeIrcMessage(
channel, message, args, content, 0);
built->flags.set(MessageFlag::Subscription);
built->flags.unset(MessageFlag::Highlighted);
if (mirrored)
if (built)
{
built->flags.set(MessageFlag::SharedMessage);
built->flags.set(MessageFlag::Subscription);
built->flags.unset(MessageFlag::Highlighted);
if (mirrored)
{
built->flags.set(MessageFlag::SharedMessage);
}
builtMessages.emplace_back(std::move(built));
}
builtMessages.emplace_back(std::move(built));
}
}