upd: change deps, fix a few bugs, update converter

Fixes User and Notes count bug (transfem-org/Sharkey#113)
Fixes build issues due to types (transfem-org/Sharkey#111)
Return accounts and notes like Iceshrimp
Use MFM class from Iceshrimp to fix HTML output for mastodon
This commit is contained in:
Mar0xy 2023-10-29 00:50:00 +02:00
parent b0a7fd6ddb
commit 82c10de265
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
14 changed files with 421 additions and 242 deletions

View file

@ -5,15 +5,16 @@
namespace Entity {
export type Account = {
id: string
fqn?: string
username: string
acct: string
display_name: string
locked: boolean
discoverable?: boolean
group: boolean | null
noindex: boolean | null
suspended: boolean | null
limited: boolean | null
group?: boolean | null
noindex?: boolean | null
suspended?: boolean | null
limited?: boolean | null
created_at: string
followers_count: number
following_count: number

View file

@ -17,7 +17,7 @@ namespace Entity {
in_reply_to_account_id: string | null
reblog: Status | null
content: string
plain_content: string | null
plain_content?: string | null
created_at: string
emojis: Emoji[]
replies_count: number

View file

@ -2017,7 +2017,7 @@ export default class Misskey implements MegalodonInterface {
}
if (options.exclude_type) {
params = Object.assign(params, {
excludeType: options.exclude_type.map(e => MisskeyAPI.Converter.encodeNotificationType(e))
excludeTypes: options.exclude_type.map(e => MisskeyAPI.Converter.encodeNotificationType(e))
})
}
}

View file

@ -78,8 +78,10 @@ namespace MisskeyAPI {
acct = `${u.username}@${u.host}`;
acctUrl = `https://${u.host}/@${u.username}`;
}
const fqn = `${u.username}@${u.host ?? host}`;
return {
id: u.id,
fqn: fqn,
username: u.username,
acct: acct,
display_name: u.name ? u.name : '',
@ -465,8 +467,8 @@ namespace MisskeyAPI {
export const stats = (s: Entity.Stats): MegalodonEntity.Stats => {
return {
user_count: s.usersCount,
status_count: s.notesCount,
user_count: s.originalUsersCount,
status_count: s.originalNotesCount,
domain_count: s.instances
}
}