Closed sahil-khanna closed 3 years ago
I discovered that BasicMessage
can be sent as below
DateTime sentTime = DateTime.UtcNow;
BasicMessageRecord basicMessageRecord = new()
{
Id = Guid.NewGuid().ToString(),
Direction = MessageDirection.Outgoing,
SentTime = sentTime,
ConnectionId = Connection.Record.Id,
Text = "text"
};
BasicMessage basicMessage = new()
{
Content = "text",
SentTime = sentTime.ToString("s", CultureInfo.InvariantCulture)
};
await walletRecordService.AddAsync(AgentContext.Wallet, basicMessageRecord);
IMessageService messageService = App.Container.Resolve<IMessageService>();
await messageService.SendAsync(AgentContext, basicMessage, Connection.Record);
I'm trying to send a
BasicMessage
from the Xamarin Edge Agent to the Aca-Py Cloud Agent using the below codeThe message is not received at the Aca-Py end
I also tried sending the message as below. However, I get the error as
{"@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/notification/1.0/problem-report", "@id": "8b605a23-b58d-466d-bb7a-eb456bd48ac1", "~thread": {"thid": "59134bfd-7b2a-49ee-ac42-9a4c310c632b"}, "explain-ltxt": "Error deserializing message: BasicMessage schema validation failed"}
The BasicMessageRecords aren't fetched with the below code on the Edge Agent indicating that the message isn't sent from Edge Agent to Aca-Py
Note: The Xamarin Edge Agent is able to receive messages from Aca-Py without any issue