Skip to content

SocialChannelSavingNotification

Published before a channel is added or changed. A handler can change the channel or refuse the save.

The following properties are available within the notification

Property Name Type Use
Target SocialChannel The channel as it is about to be saved.
Existing SocialChannel? The stored channel on an update; null when the channel is being added. Changes to it are ignored.
Messages EventMessages Add the message to show when you cancel.
Cancel bool Set to true to cancel without a message.
When Read back from Target
Adding Network, Name, AutomateConnectionId, SettingsJson
Updating Name, IsEnabled, SettingsJson

Changes to any other property are ignored. SettingsJson is a JSON object of the network’s channel options, for example {"organizationId":"12345"}.

Call CancelOperation(new EventMessage(category, message, EventMessageType.Error)). Nothing is saved, and the result is channel.cancelled:<message>.

  • Social’s checks run after the handlers, on what they leave: the name, an available network, valid options, a connection of the right type, and the edition’s channel limit. A handler can’t get past them.
  • On an update, a channel that doesn’t exist (channel.unknown) is refused before the handlers.
  • In the management API, a missing or too long name is refused before the handlers.