buffer: Reenable redaction event handling.
This commit is contained in:
parent
2a4ec66742
commit
3bd4be2258
1 changed files with 5 additions and 5 deletions
|
@ -29,7 +29,6 @@ from .utils import (
|
||||||
shorten_sender,
|
shorten_sender,
|
||||||
server_ts_to_weechat,
|
server_ts_to_weechat,
|
||||||
string_strikethrough,
|
string_strikethrough,
|
||||||
mxc_to_http
|
|
||||||
)
|
)
|
||||||
from .plugin_options import RedactType
|
from .plugin_options import RedactType
|
||||||
|
|
||||||
|
@ -43,7 +42,8 @@ from nio import (
|
||||||
RoomTopicEvent,
|
RoomTopicEvent,
|
||||||
RoomMessageEmote,
|
RoomMessageEmote,
|
||||||
RoomNameEvent,
|
RoomNameEvent,
|
||||||
RoomMessageUnknown
|
RoomMessageUnknown,
|
||||||
|
RedactionEvent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ class RoomBuffer(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
lines = self.weechat_buffer.find_lines(
|
lines = self.weechat_buffer.find_lines(
|
||||||
partial(predicate, event.redaction_id)
|
partial(predicate, event.redacts)
|
||||||
)
|
)
|
||||||
|
|
||||||
# No line to redact, return early
|
# No line to redact, return early
|
||||||
|
@ -956,8 +956,8 @@ class RoomBuffer(object):
|
||||||
self.get_event_tags(event)
|
self.get_event_tags(event)
|
||||||
)
|
)
|
||||||
|
|
||||||
# elif isinstance(event, RoomRedactionEvent):
|
elif isinstance(event, RedactionEvent):
|
||||||
# self._redact_line(event)
|
self._redact_line(event)
|
||||||
|
|
||||||
elif isinstance(event, RedactedEvent):
|
elif isinstance(event, RedactedEvent):
|
||||||
self._handle_redacted_message(event)
|
self._handle_redacted_message(event)
|
||||||
|
|
Loading…
Reference in a new issue