diff --git a/servers/mu/src/domain/lib/build-tx.js b/servers/mu/src/domain/lib/build-tx.js index ac48a29c0..ae53b485f 100644 --- a/servers/mu/src/domain/lib/build-tx.js +++ b/servers/mu/src/domain/lib/build-tx.js @@ -57,14 +57,19 @@ export function buildTxWith (env) { .map((res) => { const tagsIn = [ { name: 'Data-Protocol', value: 'ao' }, + { name: 'Type', value: 'Message' }, ...ctx.cachedMsg.msg.Tags?.filter((tag) => { - return ![ + const isExcludedName = [ 'Data-Protocol', 'Variant', 'From-Process', 'From-Module', 'Assignments' ].includes(tag.name) + + const isTypeMessage = tag.name === 'Type' && tag.value === 'Message' + + return !isExcludedName && !isTypeMessage }) ?? [], { name: 'Variant', value: 'ao.TN.1' }, { name: 'From-Process', value: ctx.cachedMsg.fromProcessId }, diff --git a/servers/mu/src/domain/lib/build-tx.test.js b/servers/mu/src/domain/lib/build-tx.test.js index fd06ffb6a..2bee3c89a 100644 --- a/servers/mu/src/domain/lib/build-tx.test.js +++ b/servers/mu/src/domain/lib/build-tx.test.js @@ -17,6 +17,9 @@ async function buildAndSign ({ processId, tags, anchor }) { assert.equal(tags.find((tag) => tag.name === 'From-Process' ).value, 'process-123') + assert.equal(tags.find((tag) => + tag.name === 'Type' + ).value, 'Message') assert.equal(tags.filter((tag) => tag.name === 'From-Process' ).length, 1)