-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure only public content is posted (#258)
refs [AP-641](https://linear.app/ghost/issue/AP-641/only-public-posts-should-be-sent-to-the-fediverse) Ensured that only public content is posted when the visibility of an incoming post is not `public`
- Loading branch information
Showing
5 changed files
with
193 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import type { Temporal } from '@js-temporal/polyfill'; | ||
|
||
/** | ||
* Visibility of a post | ||
*/ | ||
export enum PostVisibility { | ||
/** | ||
* Public post | ||
*/ | ||
Public = 'public', | ||
/** | ||
* Members-only post | ||
*/ | ||
Members = 'members', | ||
/** | ||
* Paid post | ||
*/ | ||
Paid = 'paid', | ||
/** | ||
* Tiers post | ||
*/ | ||
Tiers = 'tiers', | ||
} | ||
|
||
/** | ||
* Post to be published to the Fediverse | ||
*/ | ||
export interface Post { | ||
/** | ||
* Unique identifier of the post | ||
*/ | ||
id: string; | ||
/** | ||
* Title of the post | ||
*/ | ||
title: string; | ||
/** | ||
* Content of the post | ||
*/ | ||
content: string | null; | ||
/** | ||
* Excerpt of the post | ||
*/ | ||
excerpt: string | null; | ||
/** | ||
* URL to the post's feature image | ||
*/ | ||
featureImageUrl: URL | null; | ||
/** | ||
* Published date of the post | ||
*/ | ||
publishedAt: Temporal.Instant; | ||
/** | ||
* URL to the post | ||
*/ | ||
url: URL; | ||
/** | ||
* Visibility of the post | ||
*/ | ||
visibility: PostVisibility; | ||
/** | ||
* Information about the post's author | ||
*/ | ||
author: { | ||
/** | ||
* The author's Fediverse handle | ||
*/ | ||
handle: string; | ||
}; | ||
} |