MessageHandler.handleMessage() method
Parses a raw message.
After the message is parsed, you can decide if it should be saved, and pass the result to dataStoreSaveMessage() to save it.
Signature:
handleMessage(args: IHandleMessageArgs, context: IAgentContext<IDataStore>): Promise<IMessage>;
Parameters
Parameter | Type | Description |
---|---|---|
args | IHandleMessageArgs | The raw message to be handled along with optional metadata about the origin. |
context | IAgentContext<IDataStore> | Execution context. Requires agent with IDataStore methods |
Returns:
Promise<IMessage>