EventGroupChatUpdated constructor

const EventGroupChatUpdated({
  1. @Default.new('chat.bsky.moderation.subscribeModEvents#eventGroupChatUpdated') String $type,
  2. required String actorDid,
  3. @JsonKey.new(toJson: iso8601) required DateTime convoCreatedAt,
  4. required String convoId,
  5. @JsonKey.new(toJson: iso8601) required DateTime createdAt,
  6. required int groupMemberCount,
  7. required String groupName,
  8. String? joinLinkCode,
  9. bool? joinLinkFollowersOnly,
  10. bool? joinLinkRequiresApproval,
  11. @EventGroupChatUpdatedLockReasonConverter() EventGroupChatUpdatedLockReason? lockReason,
  12. String? newName,
  13. String? oldName,
  14. required String ownerDid,
  15. required String rev,
  16. @EventGroupChatUpdatedUpdateTypeConverter() required EventGroupChatUpdatedUpdateType updateType,
  17. Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory EventGroupChatUpdated({
  @Default('chat.bsky.moderation.subscribeModEvents#eventGroupChatUpdated')
  String $type,

  /// The DID of the actor performing the action (the owner).
  required String actorDid,

  /// When the group was originally created.
  @JsonKey(toJson: iso8601) required DateTime convoCreatedAt,
  required String convoId,
  @JsonKey(toJson: iso8601) required DateTime createdAt,

  /// Current member count at the time of the event.
  required int groupMemberCount,

  /// Current group name.
  required String groupName,

  /// The code of the join link. Only present when updateType is join-link-related.
  String? joinLinkCode,

  /// Whether the join link is restricted to followers of the owner. Only present when updateType is join-link-related.
  bool? joinLinkFollowersOnly,

  /// Whether the join link requires owner approval to join. Only present when updateType is join-link-related.
  bool? joinLinkRequiresApproval,

  /// Why the group was locked. Only present when updateType is 'locked'.
  @EventGroupChatUpdatedLockReasonConverter()
  EventGroupChatUpdatedLockReason? lockReason,

  /// The new group name. Only present when updateType is 'name_changed'.
  String? newName,

  /// The previous group name. Only present when updateType is 'name_changed'.
  String? oldName,

  /// The DID of the group chat owner.
  required String ownerDid,
  required String rev,

  /// What changed.
  @EventGroupChatUpdatedUpdateTypeConverter()
  required EventGroupChatUpdatedUpdateType updateType,

  Map<String, dynamic>? $unknown,
}) = _EventGroupChatUpdated;