summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2011-01-07 12:00:25 +0100
committerGervase Markham <gerv@mozilla.org>2011-01-07 12:00:25 +0100
commit0459ae826b56c137409c5236bbf78ef939ab968c (patch)
treeff2ed0a8aa107865cbd63d17a7e06dbf5aa9141c /Bugzilla/BugMail.pm
parentaa94254a92a7d1c4f09275b5937c3eae7300dad6 (diff)
downloadbugzilla-0459ae826b56c137409c5236bbf78ef939ab968c.tar.gz
bugzilla-0459ae826b56c137409c5236bbf78ef939ab968c.tar.xz
Provide user objects to bugmail_recipients hook. r,a=mkanat.
https://bugzilla.mozilla.org/show_bug.cgi?id=622813
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index dfd7584ea..048488e02 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -184,8 +184,14 @@ sub Send {
}
}
+ # Make sure %user_cache has every user in it so far referenced
+ foreach my $user_id (keys %recipients) {
+ $user_cache{$user_id} ||= new Bugzilla::User($user_id);
+ }
+
Bugzilla::Hook::process('bugmail_recipients',
- { bug => $bug, recipients => \%recipients });
+ { bug => $bug, recipients => \%recipients,
+ users => \%user_cache });
# Find all those user-watching anyone on the current list, who is not
# on it already themselves.