Changeset e5da3fe for message.c


Ignore:
Timestamp:
Mar 24, 2011, 4:24:25 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
a5b5d00
Parents:
283ff1e
git-author:
DD Liu <liudi@mit.edu> (11/06/10 22:35:54)
git-committer:
David Benjamin <davidben@mit.edu> (03/24/11 16:24:25)
Message:
Create per-recipient copies of outgoing messages for non-CC'd personals

Fixes bug #63.

[davidben@mit.edu: Fix up comment, rebase to master]
[davidben@mit.edu: Address nitpicks]
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    rf54b07d re5da3fe  
    958958}
    959959
    960 void owl_message_create_from_zwrite(owl_message *m, const owl_zwrite *z, const char *body)
     960void owl_message_create_from_zwrite(owl_message *m, const owl_zwrite *z, const char *body, int recip_index)
    961961{
    962962  char *replyline;
     
    970970  owl_message_set_class(m, owl_zwrite_get_class(z));
    971971  owl_message_set_instance(m, owl_zwrite_get_instance(z));
    972   if (owl_zwrite_get_numrecips(z)>0) {
    973     char *longzuser = long_zuser(owl_zwrite_get_recip_n(z, 0));
    974     owl_message_set_recipient(m,
    975                               longzuser); /* only gets the first user, must fix */
     972  if (recip_index < owl_zwrite_get_numrecips(z)) {
     973    char *longzuser = long_zuser(owl_zwrite_get_recip_n(z, recip_index));
     974    owl_message_set_recipient(m, longzuser);
    976975    g_free(longzuser);
    977976  }
Note: See TracChangeset for help on using the changeset viewer.