summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2021-05-14 15:02:47 +0300
committerdefanor <defanor@uberspace.net>2021-05-14 15:02:47 +0300
commitdb667520603613b46cdcda901216f87d7ee19f2a (patch)
tree1639820c7c21c1774c15120febd5195bcf605ac0
parentd92a42f6a7367d047471e4ff871c1f0edf1c420d (diff)
Add timestamps into xmpp.el message buffers
-rw-r--r--emacs/xmpp.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/emacs/xmpp.el b/emacs/xmpp.el
index 6f6c008..e04cfe5 100644
--- a/emacs/xmpp.el
+++ b/emacs/xmpp.el
@@ -147,13 +147,15 @@
(when message-body
(with-current-buffer (xmpp-query message-from proc)
(xmpp-insert
- (concat "< " (car (xml-node-children message-body)) "\n"))
+ (concat (format-time-string "%FT%T%z")
+ " < " (car (xml-node-children message-body)) "\n"))
(xmpp-message-notify))))
("groupchat"
(when message-body
(with-current-buffer (xmpp-muc-buffer message-from proc)
(xmpp-insert
- (concat (xmpp-jid-resource message-from) ": "
+ (concat (format-time-string "%FT%T%z") ", "
+ (xmpp-jid-resource message-from) ": "
(car (xml-node-children message-body)) "\n"))
(xmpp-message-notify))))))))))
@@ -190,7 +192,8 @@
(with-current-buffer buf
(xmpp-insert
(concat
- "> " (car (xml-node-children message-body)) "\n")))))))
+ (format-time-string "%FT%T%z")
+ " > " (car (xml-node-children message-body)) "\n")))))))
("groupchat" nil)))))))
(defun xmpp-process (proc xml)