feat: Update(Note)

This commit is contained in:
Julian Lam
2024-01-30 11:25:45 -05:00
parent 86a607ce8c
commit 0e59f3124e
2 changed files with 35 additions and 14 deletions

View File

@@ -140,6 +140,8 @@ postsAPI.edit = async function (caller, data) {
if (!editResult.post.deleted) {
websockets.in(`topic_${editResult.topic.tid}`).emit('event:post_edited', editResult);
await require('.').activitypub.update.note(caller, { post: postObj[0] });
return returnData;
}
@@ -152,6 +154,7 @@ postsAPI.edit = async function (caller, data) {
const uids = _.uniq(_.flatten(memberData).concat(String(caller.uid)));
uids.forEach(uid => websockets.in(`uid_${uid}`).emit('event:post_edited', editResult));
return returnData;
};