PostContentData

public struct PostContentData : Content
extension PostContentData: RCFValidatable

Used to create or update a ForumPost, Twarrt, or FezPost.

Required by:

  • POST /api/v3/forum/ID/create
  • POST /api/v3/forum/post/ID
  • POST /api/v3/forum/post/ID/update
  • POST /api/v3/twitarr/create
  • POST /api/v3/twitarr/ID/reply
  • POST /api/v3/twitarr/ID/update
  • POST /api/v3/fez/ID/post

See ForumController.postUpdateHandler(_:data:).

  • The new text of the forum post.

    Declaration

    Swift

    var text: String
  • An array of up to 4 images (1 when used in a Fez post). Each image can specify either new image data or an existing image filename. For new posts, images will generally contain all new image data. When editing existing posts, images may contain a mix of new and existing images. Reorder ImageUploadDatas to change presentation order. Set images to [] to remove images attached to post when editing.

    Declaration

    Swift

    var images: [ImageUploadData]
  • If the poster has moderator privileges and this field is TRUE, this post will be authored by ‘moderator’ instead of the author. Set this to FALSE unless the user is a moderator who specifically chooses this option.

    Declaration

    Swift

    var postAsModerator: Bool
  • If the poster has moderator privileges and this field is TRUE, this post will be authored by ‘TwitarrTeam’ instead of the author. Set this to FALSE unless the user is a moderator who specifically chooses this option.

    Declaration

    Swift

    var postAsTwitarrTeam: Bool
  • Declaration

    Swift

    func runValidations(using decoder: ValidatingDecoder) throws
  • Declaration

    Swift

    func effectiveAuthor(actualAuthor: UserCacheData, on req: Request) -> UserCacheData