Next: , Previous: Standard alerts, Up: Customizing alerts



10.6.2 Presence alerts

Set 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 Roster structure), oldstatus and newstatus are the previous and current stati, respectively, and statustext is the status message if provided, otherwise nil.

newstatus can also be one of "subscribe", "subscribed", "unsubscribe" and "unsubscribed".

The default function, jabber-presence-default-message, returns nil if oldstatus and newstatus are the same, and in other cases constructs a message from the given data.

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.