summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api
diff options
context:
space:
mode:
authorKevinWh0 <45321184+ChaoticLeah@users.noreply.github.com>2024-05-31 12:21:25 +0200
committerKevinWh0 <45321184+ChaoticLeah@users.noreply.github.com>2024-05-31 12:21:25 +0200
commit1656c02536108e9566ace58809ddc86124b1bfdf (patch)
tree615a3aab4c803d5172e609762aeb4eb3d27e174d /packages/backend/src/server/api
parentfixed the search url (diff)
downloadsharkey-1656c02536108e9566ace58809ddc86124b1bfdf.tar.gz
sharkey-1656c02536108e9566ace58809ddc86124b1bfdf.tar.bz2
sharkey-1656c02536108e9566ace58809ddc86124b1bfdf.zip
renamed toMastoHtml to toMastoApiHtml to clear up what it does
Diffstat (limited to 'packages/backend/src/server/api')
-rw-r--r--packages/backend/src/server/api/mastodon/converters.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/server/api/mastodon/converters.ts b/packages/backend/src/server/api/mastodon/converters.ts
index 326d3a1d5c..6b2c991ff2 100644
--- a/packages/backend/src/server/api/mastodon/converters.ts
+++ b/packages/backend/src/server/api/mastodon/converters.ts
@@ -110,7 +110,7 @@ export class MastoConverters {
private async encodeField(f: Entity.Field): Promise<Entity.Field> {
return {
name: f.name,
- value: await this.mfmService.toMastoHtml(mfm.parse(f.value), [], true) ?? escapeMFM(f.value),
+ value: await this.mfmService.toMastoApiHtml(mfm.parse(f.value), [], true) ?? escapeMFM(f.value),
verified_at: null,
};
}
@@ -179,7 +179,7 @@ export class MastoConverters {
const files = this.driveFileEntityService.packManyByIds(edit.fileIds);
const item = {
account: noteUser,
- content: this.mfmService.toMastoHtml(mfm.parse(edit.newText ?? ''), JSON.parse(note.mentionedRemoteUsers)).then(p => p ?? ''),
+ content: this.mfmService.toMastoApiHtml(mfm.parse(edit.newText ?? ''), JSON.parse(note.mentionedRemoteUsers)).then(p => p ?? ''),
created_at: lastDate.toISOString(),
emojis: [],
sensitive: files.then(files => files.length > 0 ? files.some((f) => f.isSensitive) : false),
@@ -240,7 +240,7 @@ export class MastoConverters {
});
const content = note.text !== null
- ? quoteUri.then(quoteUri => this.mfmService.toMastoHtml(mfm.parse(note.text!), JSON.parse(note.mentionedRemoteUsers), false, quoteUri))
+ ? quoteUri.then(quoteUri => this.mfmService.toMastoApiHtml(mfm.parse(note.text!), JSON.parse(note.mentionedRemoteUsers), false, quoteUri))
.then(p => p ?? escapeMFM(note.text!))
: '';