upd: add MFM to HTML support and Mentions parsing to mastodon api (#33)
* upd: attempt to turn MFM to html on mastodon * revert: recent change until better implementation later * chore: remove unused packages * Update docker.yml * upd: add MFM to HTML for timelines and status view * chore: lint * upd: megalodon resolve urls * upd: add spliting * test: local user mention * test: change local user url in mention * upd: change check * test: megalodon changes * upd: edit resolving of local users This is starting to drive me nuts * upd: remove the @ symbol in query * fix: make renderPerson return host instead of null for local * upd: change url for local user * upd: change limit * upd: add url to output * upd: add mastodon boolean * test: test different format * fix: test of different format * test: change up resolving * fix: forgot to provide url * upd: change lookup function a bit * test: substring * test: regex * upd: remove substr * test: new regexs * dirty test * test: one last attempt for today * upd: fix build error * upd: take input from iceshrimp dev * upd: parse remote statuses * upd: fix pleroma users misformatted urls * upd: add uri to normal user * fix: forgot to push updated types * fix: resolving broke * fix: html not converting correctly * fix: return default img if no banner * upd: swap out img used for no header, set fallback avatar * fix: html escaped & and ' symbols * upd: fix ' converting into 39; and get profile fields * upd: resolve fields on lookup --------- Co-authored-by: Amelia Yukii <123300075+Insert5StarName@users.noreply.github.com>
This commit is contained in:
parent
e5d9eb3082
commit
54578f6965
13 changed files with 237 additions and 41 deletions
|
|
@ -93,11 +93,11 @@ namespace MisskeyAPI {
|
|||
following_count: u.followingCount ? u.followingCount : 0,
|
||||
statuses_count: u.notesCount ? u.notesCount : 0,
|
||||
note: u.description ? u.description : '',
|
||||
url: acctUrl,
|
||||
avatar: u.avatarUrl,
|
||||
avatar_static: u.avatarUrl,
|
||||
header: u.bannerUrl ? u.bannerUrl : '',
|
||||
header_static: u.bannerUrl ? u.bannerUrl : '',
|
||||
url: u.uri ?? acctUrl,
|
||||
avatar: u.avatarUrl ? u.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
|
||||
avatar_static: u.avatarUrl ? u.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
|
||||
header: u.bannerUrl ? u.bannerUrl : 'https://dev.joinsharkey.org/static-assets/transparent.png',
|
||||
header_static: u.bannerUrl ? u.bannerUrl : 'https://dev.joinsharkey.org/static-assets/transparent.png',
|
||||
emojis: mapEmojis(u.emojis),
|
||||
moved: null,
|
||||
fields: [],
|
||||
|
|
@ -128,11 +128,11 @@ namespace MisskeyAPI {
|
|||
following_count: u.followingCount,
|
||||
statuses_count: u.notesCount,
|
||||
note: u.description ? u.description.replace(/\n|\\n/g, "<br>") : '',
|
||||
url: acctUrl,
|
||||
avatar: u.avatarUrl,
|
||||
avatar_static: u.avatarUrl,
|
||||
header: u.bannerUrl,
|
||||
header_static: u.bannerUrl,
|
||||
url: u.uri ?? acctUrl,
|
||||
avatar: u.avatarUrl ? u.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
|
||||
avatar_static: u.avatarUrl ? u.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
|
||||
header: u.bannerUrl ? u.bannerUrl : 'https://dev.joinsharkey.org/static-assets/transparent.png',
|
||||
header_static: u.bannerUrl ? u.bannerUrl : 'https://dev.joinsharkey.org/static-assets/transparent.png',
|
||||
emojis: mapEmojis(u.emojis),
|
||||
moved: null,
|
||||
fields: [],
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ namespace MisskeyEntity {
|
|||
notesCount?: number
|
||||
host: string | null
|
||||
avatarUrl: string
|
||||
uri?: string
|
||||
bannerUrl?: string | null
|
||||
avatarColor: string
|
||||
emojis: Array<Emoji> | { [key: string]: string }
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ namespace MisskeyEntity {
|
|||
emojis: Array<Emoji> | { [key: string]: string }
|
||||
createdAt: string
|
||||
bannerUrl: string
|
||||
uri: string
|
||||
bannerColor: string
|
||||
isLocked: boolean
|
||||
isSilenced: boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue