summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-03-25 22:20:03 +0100
committermathieui <mathieui@mathieui.net>2021-04-02 17:44:36 +0200
commit6ebffc1decbf9386e5a38b6544b6d4d05d37498f (patch)
treed77be3243fbe3e9c11a86417528f110cffb7aba8
parent9b01b9afa1705a47038beff6ef04ea7910e54f50 (diff)
downloadpoezio-6ebffc1decbf9386e5a38b6544b6d4d05d37498f.tar.gz
poezio-6ebffc1decbf9386e5a38b6544b6d4d05d37498f.tar.bz2
poezio-6ebffc1decbf9386e5a38b6544b6d4d05d37498f.tar.xz
poezio-6ebffc1decbf9386e5a38b6544b6d4d05d37498f.zip
fix: unify signature of modify_message
-rw-r--r--poezio/tabs/basetabs.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 3d30fe80..372f2349 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -47,6 +47,7 @@ from poezio.decorators import command_args_parser, refresh_wrapper
from poezio.logger import logger
from poezio.text_buffer import TextBuffer
from poezio.theming import get_theme, dump_tuple
+from poezio.user import User
from poezio.ui.funcs import truncate_nick
from poezio.ui.types import BaseMessage, InfoMessage, Message
from poezio.timed_events import DelayedEvent
@@ -603,14 +604,18 @@ class ChatTab(Tab):
self._text_buffer.add_message(message)
def modify_message(self,
- txt,
- old_id,
- new_id,
- user=None,
- jid=None,
- nickname=None):
+ txt: str,
+ old_id: str,
+ new_id: str,
+ time: Optional[datetime],
+ delayed: bool = False,
+ nickname: Optional[str] = None,
+ user: Optional[User] = None,
+ jid: Optional[JID] = None,
+ ) -> bool:
message = self._text_buffer.modify_message(
- txt, old_id, new_id, user=user, jid=jid)
+ txt, old_id, new_id, user=user, jid=jid, time=time
+ )
if message:
self.log_message(message, typ=1)
self.text_win.modify_message(message.identifier, message)