Fix freebie comment edits like a post (#1298)

This commit is contained in:
ekzyis 2024-08-14 09:31:52 -05:00 committed by GitHub
parent cb2efb0a7f
commit 56d55027ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -1288,9 +1288,12 @@ export const updateItem = async (parent, { sub: subName, forward, ...item }, { m
item.url = removeTracking(item.url)
}
// prevent editing a bio like a regular item
if (old.bio) {
// prevent editing a bio like a regular item
item = { id: Number(item.id), text: item.text, title: `@${user.name}'s bio`, userId: me.id }
} else if (old.parentId) {
// prevent editing a comment like a post
item = { id: Number(item.id), text: item.text, userId: me.id }
} else {
item = { subName, userId: me.id, ...item }
item.forwardUsers = await getForwardUsers(models, forward)