ircd:Ⓜ️:room::messages: Add option toggling redacted query.
This commit is contained in:
parent
00829d2118
commit
b4f869a616
|
@ -29,17 +29,20 @@ struct ircd::m::room::messages
|
|||
static const event::fetch::opts fopts;
|
||||
|
||||
room::type events;
|
||||
bool redacted {false};
|
||||
|
||||
public:
|
||||
bool for_each(const closure &) const;
|
||||
|
||||
messages(const m::room &,
|
||||
const decltype(room::type::range) & = { -1UL, -1L });
|
||||
const decltype(room::type::range) & = { -1UL, -1L },
|
||||
const bool redacted = false);
|
||||
};
|
||||
|
||||
inline
|
||||
ircd::m::room::messages::messages(const m::room &room,
|
||||
const decltype(room::type::range) &range)
|
||||
const decltype(room::type::range) &range,
|
||||
const bool redacted)
|
||||
:events
|
||||
{
|
||||
room.room_id,
|
||||
|
@ -47,4 +50,8 @@ ircd::m::room::messages::messages(const m::room &room,
|
|||
range,
|
||||
false,
|
||||
}
|
||||
,redacted
|
||||
{
|
||||
redacted
|
||||
}
|
||||
{}
|
||||
|
|
|
@ -26,7 +26,7 @@ const
|
|||
(const string_view &type, const uint64_t &depth, event::idx event_idx)
|
||||
{
|
||||
assert(type == "m.room.message");
|
||||
if(redacted(event_idx))
|
||||
if(!redacted && m::redacted(event_idx))
|
||||
return true;
|
||||
|
||||
if(!seek(std::nothrow, event, event_idx))
|
||||
|
|
Loading…
Reference in New Issue