Distinguish (#73)

* Add distinguish

* v0.17.0-rc.41
This commit is contained in:
Dessalines 2022-08-17 19:29:58 -04:00 committed by GitHub
parent 96879bf1b3
commit 8d0b25d862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -1,7 +1,7 @@
{
"name": "lemmy-js-client",
"description": "A javascript / typescript client for Lemmy",
"version": "0.17.0-rc.39",
"version": "0.17.0-rc.41",
"author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0",
"main": "./dist/index.js",

View file

@ -27,8 +27,18 @@ export class CreateComment {
}
export class EditComment {
content: string;
comment_id: number;
@Transform(({ value }) => toOption(value), { toClassOnly: true })
@Transform(({ value }) => toUndefined(value), { toPlainOnly: true })
@Expose()
content: Option<string>;
/**
* "Distinguishes" a comment, or speak officially. Only doable by community mods or admins.
*/
@Transform(({ value }) => toOption(value), { toClassOnly: true })
@Transform(({ value }) => toUndefined(value), { toPlainOnly: true })
@Expose()
distinguished: Option<boolean>;
/**
* An optional front end ID, to tell which is comment is coming back.
*/

View file

@ -454,6 +454,7 @@ export class Comment {
ap_id: string;
local: boolean;
path: string;
distinguished: boolean;
}
export class PersonMention {