From b9252ec615da7eeccaab4e95b3b55049eabd478c Mon Sep 17 00:00:00 2001 From: spiral Date: Sun, 28 Nov 2021 17:35:56 -0500 Subject: [PATCH] feat: merge UPDATE_SWITCH_MEMBERS event into UPDATE_SWITCH event --- PluralKit.Core/Database/Repository/ModelRepository.Switch.cs | 2 +- PluralKit.Core/Dispatch/DispatchModels.cs | 1 - docs/content/api/dispatch.md | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/PluralKit.Core/Database/Repository/ModelRepository.Switch.cs b/PluralKit.Core/Database/Repository/ModelRepository.Switch.cs index 93868bf5..4b3988bd 100644 --- a/PluralKit.Core/Database/Repository/ModelRepository.Switch.cs +++ b/PluralKit.Core/Database/Repository/ModelRepository.Switch.cs @@ -82,7 +82,7 @@ public partial class ModelRepository _ = _dispatch.Dispatch(switchId, new UpdateDispatchData { - Event = DispatchEvent.UPDATE_SWITCH_MEMBERS, + Event = DispatchEvent.UPDATE_SWITCH, EventData = JObject.FromObject(new { members = await GetMemberGuids(members), diff --git a/PluralKit.Core/Dispatch/DispatchModels.cs b/PluralKit.Core/Dispatch/DispatchModels.cs index 87686e4e..66e9def9 100644 --- a/PluralKit.Core/Dispatch/DispatchModels.cs +++ b/PluralKit.Core/Dispatch/DispatchModels.cs @@ -25,7 +25,6 @@ public enum DispatchEvent CREATE_MESSAGE, CREATE_SWITCH, UPDATE_SWITCH, - UPDATE_SWITCH_MEMBERS, DELETE_SWITCH, DELETE_ALL_SWITCHES, SUCCESSFUL_IMPORT diff --git a/docs/content/api/dispatch.md b/docs/content/api/dispatch.md index b1749f6b..da72a8b2 100644 --- a/docs/content/api/dispatch.md +++ b/docs/content/api/dispatch.md @@ -51,7 +51,6 @@ PluralKit will send invalid requests to your endpoint, with `PING` event type, o |CREATE_MESSAGE|a message was sent|[message object](/api/models#message-model)| |CREATE_SWITCH|a new switch was logged|[switch object](/api/models#switch-model)| |UPDATE_SWITCH|a switch was updated|[switch object](/api/models#switch-model) with only modified keys| -|UPDATE_SWITCH_MEMBERS|the member list of a switch was updated|list of member IDs| |DELETE_SWITCH|a switch was deleted|null|old switch ID can be found in top-level `id` key| |DELETE_ALL_SWITCHES|your system's switches were bulk deleted|null| |SUCCESSFUL_IMPORT|some information was successfully imported through the `pk;import` command to your system|null|