mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 00:53:08 +02:00
Compare commits
1 commit
5ee2cc06d8
...
029be44897
Author | SHA1 | Date | |
---|---|---|---|
|
029be44897 |
13 changed files with 2 additions and 15 deletions
|
@ -279,8 +279,7 @@ export class MastoConverters {
|
||||||
emoji_reactions: status.emoji_reactions,
|
emoji_reactions: status.emoji_reactions,
|
||||||
bookmarked: false,
|
bookmarked: false,
|
||||||
quote: isQuote ? await this.convertReblog(status.reblog) : false,
|
quote: isQuote ? await this.convertReblog(status.reblog) : false,
|
||||||
// optional chaining cannot be used, as it evaluates to undefined, not null
|
edited_at: note.updatedAt?.toISOString(),
|
||||||
edited_at: note.updatedAt ? note.updatedAt.toISOString() : null,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ namespace Entity {
|
||||||
content: string
|
content: string
|
||||||
plain_content?: string | null
|
plain_content?: string | null
|
||||||
created_at: string
|
created_at: string
|
||||||
edited_at: string | null
|
|
||||||
emojis: Emoji[]
|
emojis: Emoji[]
|
||||||
replies_count: number
|
replies_count: number
|
||||||
reblogs_count: number
|
reblogs_count: number
|
||||||
|
|
|
@ -725,7 +725,6 @@ namespace FriendicaAPI {
|
||||||
content: s.content,
|
content: s.content,
|
||||||
plain_content: null,
|
plain_content: null,
|
||||||
created_at: s.created_at,
|
created_at: s.created_at,
|
||||||
edited_at: s.edited_at || null,
|
|
||||||
emojis: Array.isArray(s.emojis) ? s.emojis.map(e => emoji(e)) : [],
|
emojis: Array.isArray(s.emojis) ? s.emojis.map(e => emoji(e)) : [],
|
||||||
replies_count: s.replies_count,
|
replies_count: s.replies_count,
|
||||||
reblogs_count: s.reblogs_count,
|
reblogs_count: s.reblogs_count,
|
||||||
|
|
|
@ -17,7 +17,6 @@ namespace FriendicaEntity {
|
||||||
reblog: Status | null
|
reblog: Status | null
|
||||||
content: string
|
content: string
|
||||||
created_at: string
|
created_at: string
|
||||||
edited_at?: string | null
|
|
||||||
emojis: Emoji[]
|
emojis: Emoji[]
|
||||||
replies_count: number
|
replies_count: number
|
||||||
reblogs_count: number
|
reblogs_count: number
|
||||||
|
|
|
@ -628,7 +628,6 @@ namespace MastodonAPI {
|
||||||
content: s.content,
|
content: s.content,
|
||||||
plain_content: null,
|
plain_content: null,
|
||||||
created_at: s.created_at,
|
created_at: s.created_at,
|
||||||
edited_at: s.edited_at || null,
|
|
||||||
emojis: Array.isArray(s.emojis) ? s.emojis.map(e => emoji(e)) : [],
|
emojis: Array.isArray(s.emojis) ? s.emojis.map(e => emoji(e)) : [],
|
||||||
replies_count: s.replies_count,
|
replies_count: s.replies_count,
|
||||||
reblogs_count: s.reblogs_count,
|
reblogs_count: s.reblogs_count,
|
||||||
|
|
|
@ -18,7 +18,6 @@ namespace MastodonEntity {
|
||||||
reblog: Status | null
|
reblog: Status | null
|
||||||
content: string
|
content: string
|
||||||
created_at: string
|
created_at: string
|
||||||
edited_at?: string | null
|
|
||||||
emojis: Emoji[]
|
emojis: Emoji[]
|
||||||
replies_count: number
|
replies_count: number
|
||||||
reblogs_count: number
|
reblogs_count: number
|
||||||
|
|
|
@ -283,7 +283,6 @@ namespace MisskeyAPI {
|
||||||
: '',
|
: '',
|
||||||
plain_content: n.text ? n.text : null,
|
plain_content: n.text ? n.text : null,
|
||||||
created_at: n.createdAt,
|
created_at: n.createdAt,
|
||||||
edited_at: n.updatedAt || null,
|
|
||||||
emojis: mapEmojis(n.emojis).concat(mapReactionEmojis(n.reactionEmojis)),
|
emojis: mapEmojis(n.emojis).concat(mapReactionEmojis(n.reactionEmojis)),
|
||||||
replies_count: n.repliesCount,
|
replies_count: n.repliesCount,
|
||||||
reblogs_count: n.renoteCount,
|
reblogs_count: n.renoteCount,
|
||||||
|
|
|
@ -7,7 +7,6 @@ namespace MisskeyEntity {
|
||||||
export type Note = {
|
export type Note = {
|
||||||
id: string
|
id: string
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt?: string | null
|
|
||||||
userId: string
|
userId: string
|
||||||
user: User
|
user: User
|
||||||
text: string | null
|
text: string | null
|
||||||
|
|
|
@ -357,7 +357,6 @@ namespace PleromaAPI {
|
||||||
content: s.content,
|
content: s.content,
|
||||||
plain_content: s.pleroma.content?.['text/plain'] ? s.pleroma.content['text/plain'] : null,
|
plain_content: s.pleroma.content?.['text/plain'] ? s.pleroma.content['text/plain'] : null,
|
||||||
created_at: s.created_at,
|
created_at: s.created_at,
|
||||||
edited_at: s.edited_at || null,
|
|
||||||
emojis: Array.isArray(s.emojis) ? s.emojis.map(e => emoji(e)) : [],
|
emojis: Array.isArray(s.emojis) ? s.emojis.map(e => emoji(e)) : [],
|
||||||
replies_count: s.replies_count,
|
replies_count: s.replies_count,
|
||||||
reblogs_count: s.reblogs_count,
|
reblogs_count: s.reblogs_count,
|
||||||
|
|
|
@ -18,7 +18,6 @@ namespace PleromaEntity {
|
||||||
reblog: Status | null
|
reblog: Status | null
|
||||||
content: string
|
content: string
|
||||||
created_at: string
|
created_at: string
|
||||||
edited_at?: string | null
|
|
||||||
emojis: Emoji[]
|
emojis: Emoji[]
|
||||||
replies_count: number
|
replies_count: number
|
||||||
reblogs_count: number
|
reblogs_count: number
|
||||||
|
|
|
@ -49,7 +49,6 @@ const status: Entity.Status = {
|
||||||
content: 'hoge',
|
content: 'hoge',
|
||||||
plain_content: null,
|
plain_content: null,
|
||||||
created_at: '2019-03-26T21:40:32',
|
created_at: '2019-03-26T21:40:32',
|
||||||
edited_at: null,
|
|
||||||
emojis: [],
|
emojis: [],
|
||||||
replies_count: 0,
|
replies_count: 0,
|
||||||
reblogs_count: 0,
|
reblogs_count: 0,
|
||||||
|
|
|
@ -38,7 +38,6 @@ const status: Entity.Status = {
|
||||||
content: 'hoge',
|
content: 'hoge',
|
||||||
plain_content: 'hoge',
|
plain_content: 'hoge',
|
||||||
created_at: '2019-03-26T21:40:32',
|
created_at: '2019-03-26T21:40:32',
|
||||||
edited_at: null,
|
|
||||||
emojis: [],
|
emojis: [],
|
||||||
replies_count: 0,
|
replies_count: 0,
|
||||||
reblogs_count: 0,
|
reblogs_count: 0,
|
||||||
|
|
|
@ -37,7 +37,6 @@ const status: Entity.Status = {
|
||||||
content: 'hoge',
|
content: 'hoge',
|
||||||
plain_content: 'hoge',
|
plain_content: 'hoge',
|
||||||
created_at: '2019-03-26T21:40:32',
|
created_at: '2019-03-26T21:40:32',
|
||||||
edited_at: null,
|
|
||||||
emojis: [],
|
emojis: [],
|
||||||
replies_count: 0,
|
replies_count: 0,
|
||||||
reblogs_count: 0,
|
reblogs_count: 0,
|
||||||
|
|
Loading…
Reference in a new issue