void HighlightFilter::filterMessage(KTp::Message &message, const KTp::MessageContext &context) { QString msg = message.mainMessagePart(); if (msg.contains(context.account()->nickname(), Qt::CaseInsensitive)) { message.setProperty("highlight", true); } if (msg.contains(d->user.loginName(), Qt::CaseInsensitive)) { message.setProperty("highlight", true); } }
void FormatFilter::filterMessage (KTp::Message& message, const KTp::MessageContext &context) { Q_UNUSED(context) message.setMainMessagePart(d->filterString(message.mainMessagePart())); }