mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-17 15:00:15 -04:00
Allow room moderators to view redacted event content
Cherry-picked from ffcdac4f348ef763843017f7cc46ed63e9285183
This commit is contained in:
parent
703eb4dc19
commit
2dc2979af5
4 changed files with 84 additions and 3 deletions
|
@ -304,6 +304,15 @@ class EventsWorkerStore(SQLBaseStore):
|
|||
desc="get_received_ts",
|
||||
)
|
||||
|
||||
async def have_censored_event(self, event_id: str) -> Optional[bool]:
|
||||
return await self.db_pool.simple_select_one_onecol(
|
||||
table="redactions",
|
||||
keyvalues={"redacts": event_id},
|
||||
retcol="have_censored",
|
||||
desc="get_have_censored",
|
||||
allow_none=True,
|
||||
)
|
||||
|
||||
# Inform mypy that if allow_none is False (the default) then get_event
|
||||
# always returns an EventBase.
|
||||
@overload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue