summaryrefslogtreecommitdiff
path: root/src/common.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-08-02 16:24:10 +0200
committermathieui <mathieui@mathieui.net>2012-08-02 16:24:10 +0200
commit3897d131c1cf971a6ceb6c3d86cf83813bc26dcd (patch)
treeef56b17f851e24f879e22c87e27a80d8f69b023d /src/common.py
parent1d908702b170e5edb8ca576f54f49a69bd3e2deb (diff)
downloadpoezio-3897d131c1cf971a6ceb6c3d86cf83813bc26dcd.tar.gz
poezio-3897d131c1cf971a6ceb6c3d86cf83813bc26dcd.tar.bz2
poezio-3897d131c1cf971a6ceb6c3d86cf83813bc26dcd.tar.xz
poezio-3897d131c1cf971a6ceb6c3d86cf83813bc26dcd.zip
Implement XEP-0012 (last activity) ; Fixes #1870
- Add a /activity command - Load xep_0012 on start - Add a 'l' shortcut in the roster to get the last activity - Using "/activity" in a direct conversation will add a message in the conversation, and not in the info buffer.
Diffstat (limited to 'src/common.py')
-rw-r--r--src/common.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common.py b/src/common.py
index 647454cb..aae5928c 100644
--- a/src/common.py
+++ b/src/common.py
@@ -233,6 +233,8 @@ def parse_secs_to_str(duration=0):
result += '%sh' % hours if hours else ''
result += '%sm' % mins if mins else ''
result += '%ss' % secs if secs else ''
+ if not result:
+ result = '0s'
return result
def parse_command_args_to_alias(arg, strto):