Add (us)subscribe commands and pass sender address along.
This commit is contained in:
parent
98ce48f827
commit
831f3ef17a
1 changed files with 5 additions and 2 deletions
|
|
@ -24,13 +24,14 @@ sub processCommand {
|
|||
my $session = shift;
|
||||
my $command = shift;
|
||||
my $parameter = shift;
|
||||
my $sender = shift;
|
||||
|
||||
my $commandClass = resolveCommandClass( $command )
|
||||
|| return;
|
||||
|
||||
my $commandObject = WebGUI::Pluggable::instanciate( $commandClass, 'new', [ $session ] );
|
||||
|
||||
return $commandObject->process( $parameter );
|
||||
return $commandObject->process( $parameter, $sender );
|
||||
}
|
||||
|
||||
sub session {
|
||||
|
|
@ -42,7 +43,9 @@ sub resolveCommandClass {
|
|||
|
||||
# TODO: Do not hard code.
|
||||
my %commands = (
|
||||
bounce => 'WebGUI::MailCommand::Bounce',
|
||||
unsubscribe => 'WebGUI::MailCommand::Unsubscribe',
|
||||
subscribe => 'WebGUI::MailCommand::Subscribe',
|
||||
bounce => 'WebGUI::MailCommand::Bounce',
|
||||
);
|
||||
|
||||
return $commands{ $command } if exists $commands{ $command };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue