Changeset 48609ce


Ignore:
Timestamp:
Jun 6, 2007, 9:06:17 PM (13 years ago)
Author:
Alex Vandiver <alexmv@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9c590d4
Parents:
f1589b5
git-author:
Alex Vandiver <alexmv@mit.edu> (06/06/07 21:05:25)
git-committer:
Alex Vandiver <alexmv@mit.edu> (06/06/07 21:06:17)
Message:
Don't include self when replying to CC'd messages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r13a3c1db r48609ce  
    20872087        inst=owl_message_get_instance(m);
    20882088        to=owl_message_get_recipient(m);
    2089         cc=owl_message_get_cc(m);
     2089        cc=owl_message_get_cc_without_recipient(m);
    20902090        if (!strcmp(to, "") || !strcmp(to, "*")) {
    20912091          to="";
  • message.c

    rce74deb r48609ce  
    660660}
    661661
     662/* caller must free return value */
     663char *owl_message_get_cc_without_recipient(owl_message *m)
     664{
     665  char *cc, *out, *end, *user;
     666
     667  cc = owl_message_get_cc(m);
     668  out = owl_malloc(strlen(cc));
     669  end = out;
     670
     671  user = strtok(cc, " ");
     672  while (user != NULL) {
     673    if (strcasecmp(user, short_zuser(owl_message_get_recipient(m))) != 0) {
     674      strcpy(end, user);
     675      end[strlen(user)] = ' ';
     676      end += strlen(user) + 1;
     677    }
     678    user = strtok(NULL, " ");
     679  }
     680  end[0] = '\0';
     681
     682  owl_free(cc);
     683  return(out);
     684}
     685
    662686int owl_message_get_id(owl_message *m)
    663687{
Note: See TracChangeset for help on using the changeset viewer.