Added sendNotification flag to WebGUI::Friends::rejectAddRequest. Added setting which supresses friend rejection notices from the inbox.

This commit is contained in:
khenn 2010-05-13 17:15:41 -05:00
parent 6dbd389c86
commit b0c7c1162d
6 changed files with 50 additions and 11 deletions

View file

@ -87,7 +87,7 @@ sub execute {
while (my $invite = $pending->hashRef) {
my $sentOn = WebGUI::DateTime->new($session, $invite->{dateSent});
if (DateTime::Duration->compare($now - $sentOn, $outdated) == 1) {
WebGUI::Friends->new($session, WebGUI::User->new($session, $invite->{friendId}))->rejectAddRequest($invite->{inviteId});
WebGUI::Friends->new($session, WebGUI::User->new($session, $invite->{friendId}))->rejectAddRequest($invite->{inviteId},,$session->setting->get("sendRejectNotice"));
}
if (time() - $start > $ttl) {
$pending->finish;