[PATCH 11/20] cli/show: emit payload subject instead of outside subject

David Bremner david at tethera.net
Thu Jun 28 17:40:04 PDT 2018


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

>  
>      sp->map_key (sp, "Subject");
> -    sp->string (sp, g_mime_message_get_subject (message));
> +    if (msg_crypto && msg_crypto->payload_subject) {
> +	sp->string (sp, msg_crypto->payload_subject);
> +    } else
> +	sp->string (sp, g_mime_message_get_subject (message));

This is not really an issue with your patch per se, but do we actually
use this code for anything other than top level messages? I'm wondering
because of my experiments with storing message-document level headers
[1]. It seems difficult to look at the database when things are done at
the GMime level like this.

[1]      id:20180623014247.17834-1-david at tethera.net

>  test_json_nodes <<<"$output" \
>                  'crypto:[0][0][0]["crypto"]={"decrypted": {"status": "full"}}' \
>                  'subject:[0][0][0]["headers"]["Subject"]="This is a protected header"'
>  
> -

naughty white space change. Time to update your pre-commit hook?

d


More information about the notmuch mailing list