X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessage.cc;h=4b2f98fd4f3426df992e2b845595cbf0ff937bfb;hp=721c9a675a426c794999938ea62f1c009cb08ab3;hb=cd19671f51b8f87303de6ab536afd6aa36efec61;hpb=e2dd4ac00b9979de34bd517fa57de56260d38755 diff --git a/lib/message.cc b/lib/message.cc index 721c9a67..4b2f98fd 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -35,6 +35,7 @@ struct _notmuch_message { char *thread_id; char *in_reply_to; char *filename; + char *author; notmuch_message_file_t *message_file; notmuch_message_list_t *replies; unsigned long flags; @@ -110,6 +111,7 @@ _notmuch_message_create (const void *talloc_owner, message->in_reply_to = NULL; message->filename = NULL; message->message_file = NULL; + message->author = NULL; message->replies = _notmuch_message_list_create (message); if (unlikely (message->replies == NULL)) { @@ -533,6 +535,22 @@ notmuch_message_get_tags (notmuch_message_t *message) return _notmuch_convert_tags(message, i, end); } +const char * +notmuch_message_get_author (notmuch_message_t *message) +{ + return message->author; +} + +void +notmuch_message_set_author (notmuch_message_t *message, + const char *author) +{ + if (message->author) + talloc_free(message->author); + message->author = talloc_strdup(message, author); + return; +} + void _notmuch_message_set_date (notmuch_message_t *message, const char *date)