* 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 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)