submittedBy message send from processBlock() callback

Hi devs,

I'm implementing the processBlock callback in a contract. I am sending Ignis and Messages, and while debugging I found that the contract itself sends a message to the account I've send Ignis to.

The message content is as follows. It is send from the contract (ALICE) to the recipient of a sendMoneyCall (DAVE):

"senderRS" -> "ARDOR-XK4R-7VJU-6EQG-7R335"
"sender" -> "5873880488492319831"
"recipientRS" -> "ARDOR-E93F-7E8Z-BHJ8-A65RG"
"recipient" -> "9753781029058255917"
"transactionFullHash" -> "05869d7f941dab8fec892757ac0f0723fcfcd04ef13297de5674711f3d4affb4"
"blockTimestamp" -> {Long@5047} 101545652
"messageIsText" -> {Boolean@5049} true
"message" -> "{"submittedBy":"Contract","source":"BLOCK"}"
"isText" -> {Boolean@5049} true
"transactionTimestamp" -> {Long@5054} 101545642

Is there a way to manipulate the message, or add additional items to the JSON?

Thanks a lot

It's not exactly that the contract runner sends a message. It adds some information to any submitted transaction. It does so by adding or modifying the prunable plain message attached to the transaction.

So there are basically two options: if the submitted transaction has no message then the contract runner adds one with these fields (source, submittedBy...) but if the message already exists (note it must be a JSON string) then it adds the fields to the message. So that's how you can add additional items to the sent JSON.