;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\311\312\313\314\315\306\303&\207" [require cl custom-declare-group jabber-events nil "Message events and notifications." :group jabber custom-declare-variable jabber-events-request-these '(offline delivered displayed composing) "Request these kinds of event notifications from others." :type (set (const :tag "Delivered to offline storage" offline) (const :tag "Delivered to user's client" delivered) (const :tag "Displayed to user" displayed) (const :tag "User is typing a reply" composing))] 8) #@42 Is the other person composing a message? (defvar jabber-events-composing-p nil (#$ . 644)) (make-variable-buffer-local 'jabber-events-composing-p) #@257 In what way has the message reached the recipient? Possible values are nil (no information available), offline (queued for delivery when recipient is online), delivered (message has reached the client) and displayed (user is probably reading the message). (defvar jabber-events-arrived nil (#$ . 798)) (make-variable-buffer-local 'jabber-events-arrived) #@50 Human-readable presentation of event information (defvar jabber-events-message "" (#$ . 1158)) (make-variable-buffer-local 'jabber-events-message) (defalias 'jabber-events-update-message #[nil "\303\236A \205 \304P\211\207" [jabber-events-arrived jabber-events-composing-p jabber-events-message ((offline . "In offline storage") (delivered . "Delivered") (displayed . "Displayed")) " (typing a message)"] 2]) (add-hook 'jabber-chat-send-hooks 'jabber-events-when-sending) (defalias 'jabber-events-when-sending #[(text id) "\302\303 \210\304\305\306\307 \"BBC\207" [jabber-events-arrived jabber-events-request-these nil jabber-events-update-message x ((xmlns . "jabber:x:event")) mapcar list] 5]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\302\311\304\305\306\307&\210\300\312\302\313\304\305\306\307&\207" [custom-declare-variable jabber-events-confirm-delivered t "Send delivery confirmation if requested?" :group jabber-events :type boolean jabber-events-confirm-displayed "Send display confirmation if requested?" jabber-events-confirm-composing "Send notifications about typing a reply?"] 8) #@26 List of events requested (defvar jabber-events-requested nil (#$ . 2282)) (make-variable-buffer-local 'jabber-events-requested) #@46 Id of last message received, or nil if none. (defvar jabber-events-last-id nil (#$ . 2416)) (make-variable-buffer-local 'jabber-events-last-id) #@38 Has delivery confirmation been sent? (defvar jabber-events-delivery-confirmed nil (#$ . 2566)) (make-variable-buffer-local 'jabber-events-delivery-confirmed) #@37 Has display confirmation been sent? (defvar jabber-events-display-confirmed nil (#$ . 2730)) (make-variable-buffer-local 'jabber-events-display-confirmed) #@83 Has composing notification been sent? It can be sent and cancelled several times. (defvar jabber-events-composing-sent nil (#$ . 2891)) (add-hook 'window-configuration-change-hook 'jabber-events-confirm-display) #@135 Send display confirmation if appropriate. That is, if user allows it, if the other user requested it, and it hasn't been sent before. (defalias 'jabber-events-confirm-display #[nil "\300\301!\207" [walk-windows jabber-events-confirm-display-in-window] 2 (#$ . 3110)]) (defalias 'jabber-events-confirm-display-in-window #[(window) "r\306!q\210 \2055\n?\2055\307 >\2055\f\2055\310\f!\2055\311 \312\313\fBC\314\315\316\317\320EFE\"\210\321\211)\207" [window jabber-events-confirm-displayed jabber-events-display-confirmed jabber-events-requested jabber-chatting-with jabber-buffer-connection window-buffer displayed jabber-jid-resource jabber-send-sexp message to x ((xmlns . "jabber:x:event")) (displayed) id nil t jabber-events-last-id] 10]) (defalias 'jabber-events-after-change #[nil "dU?\n\2052 \2052 \f=?\2052\306 \307\310 BC\311\312\313 \205#\314\315\316EC\"BBE\"\210 \211)\207" [jabber-point-insert composing-now jabber-events-confirm-composing jabber-chatting-with jabber-events-composing-sent jabber-buffer-connection jabber-send-sexp message to x ((xmlns . "jabber:x:event")) append ((composing)) id nil jabber-events-last-id] 11]) (add-to-list 'jabber-message-chain 'jabber-handle-incoming-message-events t) (defalias 'jabber-handle-incoming-message-events #[(jc xml-data) "\306!?\205,\307\310\311\211:\205\312\n \"*!!\205,r\310\311\211:\205+\312\n \"*!q\210\313\314\315\303\"\316\317\320\321&\322\211:\205I\312\n \"*\323\230\203[\324\325\326\327#\210\330\211\202+\315\331\"\203\340\330\332 \210\330\211+,\333\334 \211AA\211-\335\232?\205-*\"\336\211:\205\217\312\n \"*.\337/\340K0\341\216\340/M\2101\203\262\342\f>\203\262\340\342!\210\327,2\203\313\343p\344\"\203\313\345\f>\203\313\340\345!\210\327+3\205\334\346\f>\205\334\347\325\326\330\327$+\202+ \205+\315 \336\"\205+\3502\351\3304\2115\2055@4\315 4\"\20346\332 \210\352\350\327\"\2105A\2115\204\371\330*0?\205+\315 \346\"??\332 *\207" [xml-data attribute node x jabber-events-requested jabber-events-composing-p jabber-muc-message-p get-buffer jabber-chat-get-buffer from xml-get-attribute-or-nil find "jabber:x:event" jabber-xml-get-children :key #[(x) "\303\211:\205 \304\n \"*\207" [x attribute node xmlns xml-get-attribute-or-nil] 4] :test string= type "error" remove-hook post-command-hook jabber-events-after-change t nil body jabber-events-update-message mapcar car-safe (("")) id #[(type) "\306\307\310 \311\211:\205\312 \n\"*BC\313\314\fC\315\316 EFE\"\207" [jc xml-data attribute node type jabber-events-last-id jabber-send-sexp message to from xml-get-attribute-or-nil x ((xmlns . "jabber:x:event")) id nil] 11] send-notification #[nil "\301M\207" [#1=#:old send-notification] 2] delivered get-buffer-window visible displayed composing add-hook --cl-block-nil-- (offline delivered displayed) throw jabber-events-display-confirmed jabber-events-delivery-confirmed children jabber-events-last-id #2=#:vnew #1# jabber-events-confirm-delivered jabber-events-confirm-displayed jabber-events-confirm-composing possible-node --dolist-tail-- jabber-events-arrived] 8]) (provide 'jabber-events)