summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-05-06 19:57:35 +0200
committermathieui <mathieui@mathieui.net>2016-05-06 19:57:35 +0200
commitbc6ee8dae8922cb0a32c0f38bb319d5cfe1f4e4b (patch)
treef849df2e216f35f7a06c50f1508a2e7ed25c08c2 /src/core
parentbea07f5210c44a5826cc92bbed8e0b826aa1ae93 (diff)
downloadpoezio-bc6ee8dae8922cb0a32c0f38bb319d5cfe1f4e4b.tar.gz
poezio-bc6ee8dae8922cb0a32c0f38bb319d5cfe1f4e4b.tar.bz2
poezio-bc6ee8dae8922cb0a32c0f38bb319d5cfe1f4e4b.tar.xz
poezio-bc6ee8dae8922cb0a32c0f38bb319d5cfe1f4e4b.zip
Fix #3176 (timestamp corrections properly)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/handlers.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/handlers.py b/src/core/handlers.py
index 78dba635..8cc08179 100644
--- a/src/core/handlers.py
+++ b/src/core/handlers.py
@@ -11,6 +11,7 @@ import functools
import ssl
import sys
import time
+from datetime import datetime
from hashlib import sha1, sha512
from os import path
@@ -544,7 +545,9 @@ def on_groupchat_message(self, message):
if replaced_id is not '' and config.get_by_tabname('group_corrections',
message['from'].bare):
try:
- if tab.modify_message(body, replaced_id, message['id'], time=date,
+ delayed_date = date or datetime.now()
+ if tab.modify_message(body, replaced_id, message['id'],
+ time=delayed_date,
nickname=nick_from, user=user):
self.events.trigger('highlight', message, tab)
replaced = True