From 1dc83d78016ae4bc68d72f9123c99f8139499cab Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 14 Sep 2018 06:43:25 -0700 Subject: [PATCH] modules/m_user: Search the formatted_body for a user mxid first. --- modules/m_user.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/m_user.cc b/modules/m_user.cc index 91eaceedc..e7f5b273c 100644 --- a/modules/m_user.cc +++ b/modules/m_user.cc @@ -29,6 +29,14 @@ highlighted_event(const event &event, json::get<"content"_>(event) }; + const string_view &formatted_body + { + content.get("formatted_body") + }; + + if(has(formatted_body, user.user_id)) + return true; + const string_view &body { content.get("body")