reactions
This commit is contained in:
parent
48e7094c5e
commit
c21e193fbf
9 changed files with 97 additions and 119 deletions
|
@ -1,5 +1,6 @@
|
|||
import { Temporal } from '@js-temporal/polyfill'
|
||||
import { components } from '../../api/schema.ts'
|
||||
import { immerable } from 'immer'
|
||||
|
||||
export interface EmojiReaction {
|
||||
emoji: string
|
||||
|
@ -8,6 +9,8 @@ export interface EmojiReaction {
|
|||
}
|
||||
|
||||
export class Post {
|
||||
[immerable] = true
|
||||
|
||||
public readonly postId: string
|
||||
public readonly content: string
|
||||
public readonly media: PostMedia[]
|
||||
|
@ -44,9 +47,9 @@ export class Post {
|
|||
dto.reactions.map((r) => ({
|
||||
emoji: r.emoji,
|
||||
count: r.count,
|
||||
didReact: r.didReact
|
||||
didReact: r.didReact,
|
||||
})),
|
||||
dto.possibleReactions
|
||||
dto.possibleReactions,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue