diff options
Diffstat (limited to 'poezio/tabs/basetabs.py')
-rw-r--r-- | poezio/tabs/basetabs.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index c5d074bd..706172ed 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -748,6 +748,15 @@ class ChatTab(Tab): self.core.remove_timed_event(self.timed_event_not_paused) self.timed_event_not_paused = None + def set_last_sent_message(self, msg, correct=False): + """Ensure last_sent_message is set with the correct attributes""" + if correct: + # XXX: Is the copy needed. Is the object passed here reused + # afterwards? Who knows. + msg = copy.copy(msg) + msg['id'] = self.last_sent_message['id'] + self.last_sent_message = msg + @command_args_parser.raw def command_correct(self, line): """ |