mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Revert "Made changes to redaction function based on most recent RcGcDw commits"
This reverts commit db7665b5f6
.
This commit is contained in:
parent
db7665b5f6
commit
029fd86826
|
@ -236,15 +236,15 @@ class Wiki:
|
|||
# ids can refer to multiple events, and search does not support additive mode, so we have to loop it for all ids
|
||||
async for stacked_message, webhook in self.message_history.fetch_stacked_from_db({mode: ids, "message_display": [1, 2, 3]}):
|
||||
for message in [message for message in stacked_message.message_list if message.metadata.matches({mode: ids})]:
|
||||
if censored_properties.get("user", False) and "url" in message["author"]:
|
||||
if "user" in censored_properties and "url" in message["author"]:
|
||||
message["author"]["name"] = context._("hidden")
|
||||
message["author"].pop("url")
|
||||
if (censored_properties.get("action", False) or (censored_properties.get("content", False) and mode == "log_id")) and "url" in message.embed:
|
||||
if "action" in censored_properties and "url" in message.embed:
|
||||
message["title"] = context._("~~hidden~~")
|
||||
message.embed.pop("url")
|
||||
if censored_properties.get("content", False) and "fields" in message.embed:
|
||||
if "content" in censored_properties and "fields" in message.embed:
|
||||
message.embed.pop("fields")
|
||||
if censored_properties.get("comment", False):
|
||||
if "comment" in censored_properties:
|
||||
message["description"] = context._("~~hidden~~")
|
||||
logger.debug(f"Rev-deleting contents of message {stacked_message.discord_callback_message_id} due to being in list of ids {ids}.")
|
||||
messagequeue.add_message(QueueEntry(stacked_message, [stacked_message.webhook], self, method="PATCH"))
|
||||
|
|
Loading…
Reference in a new issue