summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py
index b6992cc5..335c0181 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1682,7 +1682,8 @@ class Core(object):
if histo_length is not None:
histo_length= str(histo_length)
if tab and not tab.joined:
- seconds = (datetime.now() - tab.last_connection).total_seconds() if tab.last_connection is not None else 0
+ delta = datetime.now() - tab.last_connection
+ seconds = delta.seconds + delta.days * 24 * 3600 if tab.last_connection is not None else 0
seconds = int(seconds)
muc.join_groupchat(self.xmpp, room, nick, password,
histo_length, current_status.message, current_status.show, seconds=seconds)