Merge pull request #488 from h3poteto/bookmark

Add bookmarked argument in status
This commit is contained in:
AkiraFukushima 2020-08-31 11:32:48 +09:00 committed by GitHub
commit d45270a48b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 14 additions and 5 deletions

View file

@ -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": {

View file

@ -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"
},

View file

@ -39,5 +39,6 @@ namespace Entity {
pinned: boolean | null
emoji_reactions: Array<Reaction>
quote: boolean
bookmarked: boolean
}
}

View file

@ -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
})

View file

@ -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

View file

@ -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
}
}

View file

@ -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

View file

@ -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?: {

View file

@ -58,6 +58,7 @@ const status: Entity.Status = {
language: null,
pinned: null,
emoji_reactions: [],
bookmarked: false,
quote: false
}
;(axios.CancelToken.source as any).mockImplementation(() => {

View file

@ -54,6 +54,7 @@ const status: Entity.Status = {
language: null,
pinned: null,
emoji_reactions: [],
bookmarked: false,
quote: false
}

View file

@ -53,6 +53,7 @@ const status: Entity.Status = {
language: null,
pinned: null,
emoji_reactions: [],
bookmarked: false,
quote: false
}