[627] in BarnOwl Developers
[D-O-H] r728 - trunk/owl
daemon@ATHENA.MIT.EDU (chmrr@MIT.EDU)
Thu Oct 29 18:08:05 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: chmrr@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU
Date: Wed, 06 Jun 2007 21:06:18 -0400
Author: chmrr
Date: 2007-06-06 21:06:17 -0400 (Wed, 06 Jun 2007)
New Revision: 728
Modified:
trunk/owl/
trunk/owl/functions.c
trunk/owl/message.c
Log:
r1610@utwig: chmrr | 2007-06-06 21:05:25 -0400
* Don't include self when replying to CC'd messages
Property changes on: trunk/owl
___________________________________________________________________
Name: svk:merge
- 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1604
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:17717
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688
+ 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1610
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:17717
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688
Modified: trunk/owl/functions.c
===================================================================
--- trunk/owl/functions.c 2007-06-05 02:30:39 UTC (rev 727)
+++ trunk/owl/functions.c 2007-06-07 01:06:17 UTC (rev 728)
@@ -2086,7 +2086,7 @@
class=owl_message_get_class(m);
inst=owl_message_get_instance(m);
to=owl_message_get_recipient(m);
- cc=owl_message_get_cc(m);
+ cc=owl_message_get_cc_without_recipient(m);
if (!strcmp(to, "") || !strcmp(to, "*")) {
to="";
} else if (to[0]=='@') {
Modified: trunk/owl/message.c
===================================================================
--- trunk/owl/message.c 2007-06-05 02:30:39 UTC (rev 727)
+++ trunk/owl/message.c 2007-06-07 01:06:17 UTC (rev 728)
@@ -659,6 +659,30 @@
return(out);
}
+/* caller must free return value */
+char *owl_message_get_cc_without_recipient(owl_message *m)
+{
+ char *cc, *out, *end, *user;
+
+ cc = owl_message_get_cc(m);
+ out = owl_malloc(strlen(cc));
+ end = out;
+
+ user = strtok(cc, " ");
+ while (user != NULL) {
+ if (strcasecmp(user, short_zuser(owl_message_get_recipient(m))) != 0) {
+ strcpy(end, user);
+ end[strlen(user)] = ' ';
+ end += strlen(user) + 1;
+ }
+ user = strtok(NULL, " ");
+ }
+ end[0] = '\0';
+
+ owl_free(cc);
+ return(out);
+}
+
int owl_message_get_id(owl_message *m)
{
return(m->id);