summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-desktop-notifications.el
diff options
context:
space:
mode:
authorAmin Bandali <mab@gnu.org>2020-01-17 22:33:03 -0500
committerAmin Bandali <mab@gnu.org>2020-01-17 22:44:49 -0500
commitdb4436eaf97718a1d24117ee082361c0cb854b8b (patch)
tree84192c1b9530f69651a9ab5f307b02dc6d119652 /lisp/erc/erc-desktop-notifications.el
parent36a40681052738ecdc569ffac4950511a39f4da6 (diff)
downloademacs-db4436eaf97718a1d24117ee082361c0cb854b8b.tar.gz
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'.
Diffstat (limited to 'lisp/erc/erc-desktop-notifications.el')
-rw-r--r--lisp/erc/erc-desktop-notifications.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/erc/erc-desktop-notifications.el b/lisp/erc/erc-desktop-notifications.el
index d8b09324a65..61412e0918d 100644
--- a/lisp/erc/erc-desktop-notifications.el
+++ b/lisp/erc/erc-desktop-notifications.el
@@ -60,7 +60,7 @@
This will replace the last notification sent with this function."
(dbus-ignore-errors
(setq erc-notifications-last-notification
- (let ((channel (current-buffer)))
+ (let ((channel (erc-get-buffer nick)))
(notifications-notify :bus erc-notifications-bus
:title (format "%s in %s"
(xml-escape-string nick)