Fix the notification action for PRIVMSG in erc-notifications-notify

* lisp/erc/erc-desktop-notifications.el (erc-notifications-notify):
explicitly request the buffer for `nick', rather than relying on
(current-buffer) returning it.  That works fine for the very first
PRIVMSG sent by `nick', but ERC seems to handle subsequent PRIVMSGs
differently, where (current-buffer) would return the server buffer
rather than the existing buffer for PRIVMSGs from `nick'.
This commit is contained in:
Amin Bandali 2020-01-17 22:33:03 -05:00
parent 36a4068105
commit db4436eaf9
No known key found for this signature in database
GPG key ID: 8B44A0CDC7B956F2

View file

@ -60,7 +60,7 @@
This will replace the last notification sent with this function." This will replace the last notification sent with this function."
(dbus-ignore-errors (dbus-ignore-errors
(setq erc-notifications-last-notification (setq erc-notifications-last-notification
(let ((channel (current-buffer))) (let ((channel (erc-get-buffer nick)))
(notifications-notify :bus erc-notifications-bus (notifications-notify :bus erc-notifications-bus
:title (format "%s in %s" :title (format "%s in %s"
(xml-escape-string nick) (xml-escape-string nick)