Merge pull request #488 from h3poteto/bookmark
Add bookmarked argument in status
This commit is contained in:
commit
d45270a48b
6
example/browser/package-lock.json
generated
6
example/browser/package-lock.json
generated
|
@ -2139,13 +2139,13 @@
|
|||
"requires": {
|
||||
"@types/oauth": "^0.9.0",
|
||||
"@types/ws": "^7.2.0",
|
||||
"axios": "^0.19.0",
|
||||
"axios": "^0.20.0",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"moment": "^2.24.0",
|
||||
"oauth": "^0.9.15",
|
||||
"socks-proxy-agent": "^5.0.0",
|
||||
"typescript": "3.8.3",
|
||||
"uuid": "^7.0.2",
|
||||
"typescript": "3.9.7",
|
||||
"uuid": "^8.0.0",
|
||||
"ws": "^7.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
4
example/typescript/package-lock.json
generated
4
example/typescript/package-lock.json
generated
|
@ -74,12 +74,12 @@
|
|||
"requires": {
|
||||
"@types/oauth": "^0.9.0",
|
||||
"@types/ws": "^7.2.0",
|
||||
"axios": "^0.19.0",
|
||||
"axios": "^0.20.0",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"moment": "^2.24.0",
|
||||
"oauth": "^0.9.15",
|
||||
"socks-proxy-agent": "^5.0.0",
|
||||
"typescript": "3.9.3",
|
||||
"typescript": "3.9.7",
|
||||
"uuid": "^8.0.0",
|
||||
"ws": "^7.2.1"
|
||||
},
|
||||
|
|
|
@ -39,5 +39,6 @@ namespace Entity {
|
|||
pinned: boolean | null
|
||||
emoji_reactions: Array<Reaction>
|
||||
quote: boolean
|
||||
bookmarked: boolean
|
||||
}
|
||||
}
|
||||
|
|
|
@ -440,6 +440,7 @@ namespace MastodonAPI {
|
|||
language: s.language,
|
||||
pinned: s.pinned,
|
||||
emoji_reactions: [],
|
||||
bookmarked: s.bookmarked,
|
||||
// Now quote is supported only fedibird.com.
|
||||
quote: s.quote !== undefined && s.quote !== null
|
||||
})
|
||||
|
|
|
@ -36,6 +36,7 @@ namespace MastodonEntity {
|
|||
application: Application | null
|
||||
language: string | null
|
||||
pinned: boolean | null
|
||||
bookmarked: boolean
|
||||
// These parameters are unique parameters in fedibird.com for quote.
|
||||
quote_id?: string
|
||||
quote?: Status | null
|
||||
|
|
|
@ -228,6 +228,7 @@ namespace MisskeyAPI {
|
|||
language: null,
|
||||
pinned: null,
|
||||
emoji_reactions: mapReactions(n.reactions, n.myReaction),
|
||||
bookmarked: false,
|
||||
quote: n.renote !== undefined && n.text !== null
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,6 +165,7 @@ namespace PleromaAPI {
|
|||
language: s.language,
|
||||
pinned: s.pinned,
|
||||
emoji_reactions: s.pleroma.emoji_reactions ? s.pleroma.emoji_reactions.map(r => reaction(r)) : [],
|
||||
bookmarked: s.bookmarked,
|
||||
quote: s.reblog !== null && s.reblog.content !== s.content
|
||||
})
|
||||
export const status_params = (s: Entity.StatusParams): MegalodonEntity.StatusParams => s
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace PleromaEntity {
|
|||
application: Application | null
|
||||
language: string | null
|
||||
pinned: boolean | null
|
||||
bookmarked: boolean
|
||||
// Reblogged status contains only local parameter.
|
||||
pleroma: {
|
||||
context?: {
|
||||
|
|
|
@ -58,6 +58,7 @@ const status: Entity.Status = {
|
|||
language: null,
|
||||
pinned: null,
|
||||
emoji_reactions: [],
|
||||
bookmarked: false,
|
||||
quote: false
|
||||
}
|
||||
;(axios.CancelToken.source as any).mockImplementation(() => {
|
||||
|
|
|
@ -54,6 +54,7 @@ const status: Entity.Status = {
|
|||
language: null,
|
||||
pinned: null,
|
||||
emoji_reactions: [],
|
||||
bookmarked: false,
|
||||
quote: false
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ const status: Entity.Status = {
|
|||
language: null,
|
||||
pinned: null,
|
||||
emoji_reactions: [],
|
||||
bookmarked: false,
|
||||
quote: false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue