You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The events being emitted in AFJ Rest are different from the event being emitted in AFJ itself. We should try to unify the events being emitted and just follow what is being emitted in AFJ.
This means that for all events being registered in server.ts we should look at the interface of the event and post that. One thing we should handle is that the event can contain object that need to be serialized to json before sending it. WE should check for each individual event, and if this is the case serialize the events ourselves.
So e.g. if we have a basic message state changed event that contains the basicMessageReocrd and the message keys under the payload we must call .toJSON() on both properties and add this to a new json object.
So currently the event looks like this (basic message taken as example):
POST <webhookUri>/basic-messages
{
"id": "<basicMessageRecordId"
// ... other properties
}
The events being emitted in AFJ Rest are different from the event being emitted in AFJ itself. We should try to unify the events being emitted and just follow what is being emitted in AFJ.
This means that for all events being registered in
server.ts
we should look at the interface of the event and post that. One thing we should handle is that the event can contain object that need to be serialized to json before sending it. WE should check for each individual event, and if this is the case serialize the events ourselves.So e.g. if we have a basic message state changed event that contains the
basicMessageReocrd
and themessage
keys under the payload we must call.toJSON()
on both properties and add this to a new json object.So currently the event looks like this (basic message taken as example):
While we want it to be:
The text was updated successfully, but these errors were encountered: