jabber-alert-presence-message-function to your desired
function. This function should look like:
(defun function (who oldstatus newstatus statustext) ... )
who is the JID symbol (see JID symbols), oldstatus and newstatus are the previous and current stati, respectively, and statustext is the status message if provided, otherwise nil.
oldstatus and newstatus can be one of
nil (i.e. offline).
newstatus can also be one of
The default function,
nil if oldstatus and newstatus are the same, and in
other cases constructs a message from the given data.
behave just like
jabber-presence-default-message, but only if
conversation buffer for according JID is already open. Use it to show
presence notifications only for “interesting” contacts.
All presence alert hooks take the same arguments plus the additional proposed-alert, which is the result of the specified message function. This last argument is usually the only one they use.