internal package Foswiki::Contrib::MailerContrib::Subscriber

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package Foswiki::Contrib::MailerContrib::Subscriber

Object that represents a subscriber to notification. A subscriber is a name (which may be a wikiName or an email address) and a list of subscriptions which describe the topis subscribed to, and unsubscriptions representing topics they are specifically not interested in. The subscriber name may also be a group, so it may expand to many email addresses.

new($name)

  • $name - Wikiname, with no web, or email address, of user targeted for notification
Create a new user.

getEmailAddresses() -> \@list

Get a list of email addresses for the user(s) represented by this subscription

STATIC getEmailAddressesForUser() -> \@list

Get a list of email addresses for the user(s) represented by this subscription. Static method provided for use by other modules.

subscribe($subs)

  • $subs - Subscription object
Add a new subscription to this subscriber object.

unsubscribe($subs)

  • $subs - Subscription object
Add a new unsubscription to this subscriber object. The unsubscription will always be added, even if there is a wildcard overlap with an existing subscription or unsubscription.

An unsubscription is a statement of the subscribers desire not to be notified of changes to this topic.

isSubscribedTo($topic, $db) -> $subscription

Check if we have a subscription to the given topic. Return the subscription that matches if we do, undef otherwise.

isUnsubscribedFrom($topic) -> $subscription

Check if we have an unsubscription from the given topic. Return the subscription that matches if we do, undef otherwise.

stringify() -> string

Return a string representation of this object, in WebNotify format.