fix: Handle webhooks correctly during socket reconnection
This commit is contained in:
@@ -30,9 +30,11 @@ export default class extends BaseModel {
|
|||||||
case ActionTypes.SOCKET_RECONNECT_HANDLE:
|
case ActionTypes.SOCKET_RECONNECT_HANDLE:
|
||||||
Webhook.all().delete();
|
Webhook.all().delete();
|
||||||
|
|
||||||
|
if (payload.webhooks) {
|
||||||
payload.webhooks.forEach((webhook) => {
|
payload.webhooks.forEach((webhook) => {
|
||||||
Webhook.upsert(webhook);
|
Webhook.upsert(webhook);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ActionTypes.CORE_INITIALIZE:
|
case ActionTypes.CORE_INITIALIZE:
|
||||||
|
|||||||
Reference in New Issue
Block a user