Merge branch 'develop' into merge/2025-03-24
# Conflicts: # packages/backend/src/core/activitypub/models/ApPersonService.ts
This commit is contained in:
commit
ea2a3be70f
135 changed files with 2259 additions and 16763 deletions
|
|
@ -14,10 +14,13 @@
|
|||
* @param additional Content warning to append
|
||||
* @param reverse If true, then the additional CW will be prepended instead of appended.
|
||||
*/
|
||||
export function appendContentWarning(original: string | null | undefined, additional: string, reverse = false): string {
|
||||
export function appendContentWarning(original: string | null | undefined, additional: string, reverse?: boolean): string;
|
||||
export function appendContentWarning(original: string, additional: string | null | undefined, reverse?: boolean): string;
|
||||
export function appendContentWarning(original: string | null | undefined, additional: string | null | undefined, reverse?: boolean): string | null;
|
||||
export function appendContentWarning(original: string | null | undefined, additional: string | null | undefined, reverse = false): string | null {
|
||||
// Easy case - if original is empty, then additional replaces it.
|
||||
if (!original) {
|
||||
return additional;
|
||||
return additional ?? null;
|
||||
}
|
||||
|
||||
// Easy case - if the additional CW is empty, then don't append it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue