diff --git a/app/soapbox/features/group/edit-group.tsx b/app/soapbox/features/group/edit-group.tsx index 4176f61060..184df76d51 100644 --- a/app/soapbox/features/group/edit-group.tsx +++ b/app/soapbox/features/group/edit-group.tsx @@ -44,7 +44,7 @@ const EditGroup: React.FC = ({ params: { groupId } }) => { const header = useImageField({ maxPixels: 1920 * 1080, preview: nonDefaultHeader(group?.header) }); const displayName = useTextField(group?.display_name); - const note = useTextField(group?.note); + const note = useTextField(group?.note_plain); const maxName = Number(instance.configuration.getIn(['groups', 'max_characters_name'])); const maxNote = Number(instance.configuration.getIn(['groups', 'max_characters_description'])); diff --git a/app/soapbox/schemas/group.ts b/app/soapbox/schemas/group.ts index 746ae9d339..38139ca42d 100644 --- a/app/soapbox/schemas/group.ts +++ b/app/soapbox/schemas/group.ts @@ -29,6 +29,9 @@ const groupSchema = z.object({ note: z.string().transform(note => note === '

' ? '' : note).catch(''), relationship: groupRelationshipSchema.nullable().catch(null), // Dummy field to be overwritten later slug: z.string().catch(''), // TruthSocial + source: z.object({ + note: z.string(), + }).optional(), // TruthSocial statuses_visibility: z.string().catch('public'), tags: z.array(groupTagSchema).catch([]), uri: z.string().catch(''), @@ -43,10 +46,10 @@ const groupSchema = z.object({ ...group, display_name_html: emojify(escapeTextContentForBrowser(group.display_name), customEmojiMap), note_emojified: emojify(group.note, customEmojiMap), - note_plain: unescapeHTML(group.note), + note_plain: group.source?.note || unescapeHTML(group.note), }; }); type Group = z.infer; -export { groupSchema, type Group }; \ No newline at end of file +export { groupSchema, type Group };