0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-18 07:50:57 +01:00

modules/m_receipt: Elide federation broadcasts for receipts of events matching sender.

This commit is contained in:
Jason Volk 2019-03-28 13:50:19 -07:00
parent c046467348
commit e1446a84da

View file

@ -400,6 +400,11 @@ try
at<"content"_>(event).get("event_id") at<"content"_>(event).get("event_id")
}; };
// Lastly, we elide broadcasts of receipts for a user's own message.
m::user::id::buf sender_buf;
if(m::get(std::nothrow, event_id, "sender", sender_buf) == user.user_id)
return;
const time_t &ms const time_t &ms
{ {
at<"content"_>(event).get<time_t>("ts", 0) at<"content"_>(event).get<time_t>("ts", 0)