No longer CC a user by default

Its annoying to CC a user on every change they make through the web
interface, if they performed the change then they know they did it
and don't need a carbon-copy cluttering up their inbox.

Add a user level preference setting to control whether or not we
should CC the user if we are sending an email on their behalf.
By default disable it, because this is a common complaint.

Bug: issue 311
Change-Id: I431cc0e5df34ef44114bf3e5c92c4f2d5e3f0354
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-07-13 11:25:11 -07:00
parent 8943adf8dc
commit 5a00b3161d
8 changed files with 94 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -118,6 +119,14 @@ abstract class EmailHeader {
list.add(addr);
}
void remove(java.lang.String email) {
for (Iterator<Address> i = list.iterator(); i.hasNext();) {
if (i.next().email.equals(email)) {
i.remove();
}
}
}
@Override
boolean isEmpty() {
return list.isEmpty();