1 ;;; jabber-carbons.el --- Support for XEP-0280: Message Carbons -*- lexical-binding: t; -*-
8 (defun jabber-carbon-success (jc xml-data context)
9 (when (equal "result" (jabber-xml-get-attribute xml-data 'type))
10 (message "Carbons feature successfully enabled for %s"
11 (jabber-connection-jid jc))))
13 (defun jabber-carbon-failure (jc xml-data context)
14 (message "Carbons feature could not be enabled: %S" xml-data))
16 (add-to-list 'jabber-jid-service-menu
17 (cons "Enable Carbons" 'jabber-enable-carbons))
20 (defun jabber-enable-carbons (jc)
21 "Send request to enable XEP-0280 Message Carbons.
23 JC is the Jabber connection."
24 (interactive (list (jabber-read-account)))
28 `(enable ((xmlns . "urn:xmpp:carbons:2")))
29 #'jabber-carbon-success "Carbons feature enablement"
30 #'jabber-carbon-failure "Carbons feature enablement"))
32 (jabber-disco-advertise-feature "urn:xmpp:carbons:2")
34 (provide 'jabber-carbons)
36 ;;; jabber-carbons.el ends here