feat: carry a signed Reply-To address for first contact
This commit is contained in:
parent
fd2d9298f8
commit
aab98ff598
6 changed files with 69 additions and 6 deletions
|
|
@ -201,6 +201,9 @@ const commands = {
|
|||
|
||||
const fields = [["Subject", parseOption("--subject")], ["In-Reply-To", parseOption("--reply-to")]]
|
||||
.filter(([, v]) => v);
|
||||
if (state.account && !rest.includes("--anonymous"))
|
||||
fields.push(["Reply-To", proto.parseAddress(`${state.account.user}@${state.account.host}` +
|
||||
(state.account.port === proto.DEFAULT_PORT ? "" : `:${state.account.port}`)).uri(me.publicKey)]);
|
||||
const body = utf8Bytes(proto.buildFrontmatter(fields, (parseOption("--body") || "") + "\n"));
|
||||
const envelope = proto.seal(me, recipient, body);
|
||||
const opened = await open(addr.host, addr.port, { requirePin: false });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue