DAML learning - Messaging feature
- ariscatanOP 2
Hi all,
I am just new to DAML and excited to learn. Currently I am following the daml learn and I am on the topic
" Add a new feature with UI elements to your Daml app" on Step 5 of 7. I get this error in my VS Code and when compiled I get the error below kindly see screenshot. Let me know if I need to do fixing on other code but I just actually followed what is on the step.
Thanks and really appreciated your thoughts.
Best
- cocreature 4
Hi @ariscatan and welcome to the forum!
Looking at the error it seems like there might have been a mixup between the fields in the
Messagetemplate and those in theSendMessagechoice.
Copying from the documentation, theMessagetemplate has 3 fields including areceiverfield.template Message with sender: Party receiver: Party content: Text where signatory sender, receiverwhile the
SendMessagechoice only has 2 and no receiver:nonconsuming choice SendMessage: ContractId Message with sender: Party content: Text controller sender do assertMsg "Designated user must follow you back to send a message" (elem sender following) create Message with sender, receiver = username, contentI suspect that your code might have a
receiverfield onSendMessageas well. In that case simply drop it and adjust your code to match the example in the docs. - ariscatan 4
Thanks @cocreature for the reply. Yes you are correct I removed the receiver and it works like a charm.
This case is solved.Thanks and more power!
