Fixed 267U.pre2

This commit is contained in:
2026-07-26 18:25:37 +09:00
parent 50bfaeafdf
commit 317d00a284
1286 changed files with 80222 additions and 1 deletions
@@ -0,0 +1,22 @@
import { MfmHelpers } from "../helpers/mfm.js";
import mfm from "mfm-js";
export class AnnouncementConverter {
static async encode(announcement, isRead) {
return {
id: announcement.id,
content: `<h1>${await MfmHelpers.toHtml(mfm.parse(announcement.title), [], null) ?? 'Announcement'}</h1>${await MfmHelpers.toHtml(mfm.parse(announcement.text), [], null) ?? ''}`,
starts_at: null,
ends_at: null,
published: true,
all_day: false,
published_at: announcement.createdAt.toISOString(),
updated_at: announcement.updatedAt?.toISOString() ?? announcement.createdAt.toISOString(),
read: isRead,
mentions: [],
statuses: [],
tags: [],
emojis: [],
reactions: []
};
}
}