Skip to content

SocialScheduleSavingNotification

Published before the shared posting schedule (its slots and, when given, its time zone) is saved from Settings › Social › Schedule & writing. A handler can change the slots or the time zone, or refuse the save.

The following properties are available within the notification

Property Name Type Use
Target SocialScheduleDraft The schedule as it is about to be saved. Change it here.
Existing ScheduleView The schedule as stored: TimeZoneId and Slots.
Messages EventMessages Add the message to return when you cancel.
Cancel bool Set to true to cancel without a message.

SocialScheduleDraft has these properties, both settable:

Property Name Type Use
Slots List<SlotInput> The posting slots that replace the current ones. A SlotInput is a Day (DayOfWeek) and a LocalTime (TimeOnly) in the schedule’s time zone.
TimeZoneId string? The time zone to set, or null to keep the current one.

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

Social’s checks run after the handlers, on what they leave: a known time zone (settings.time_zone_unknown), at most 168 slots (schedule.too_many_slots) and real days (schedule.day_invalid). Duplicate slots are dropped. The slots and the time zone are saved together, or not at all.

SocialScheduleSavedNotification is published after the save.