From f7316bde3ad12742a9597b8233d5b3795fb1a60e Mon Sep 17 00:00:00 2001 From: Joseph Perez Date: Tue, 31 Oct 2023 23:47:12 -0700 Subject: [PATCH] fix(publish): edit and reply --- components/publish/PublishWidget.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/publish/PublishWidget.vue b/components/publish/PublishWidget.vue index a8abd62eec..7344ddc1e0 100644 --- a/components/publish/PublishWidget.vue +++ b/components/publish/PublishWidget.vue @@ -174,9 +174,14 @@ async function toggleSensitive() { } async function publish() { + const isEditing = draft.editingStatus // need to save this before publishDraft const status = await publishDraft() if (status) { - const analyticsId = feedName ? `${feedName}.post.create` : 'post.create' + const analyticsId = isEditing + ? 'post.edit' + : draft.params.inReplyToId + ? 'post.reply' + : feedName ? `${feedName}.post.create` : 'post.create' engagement.record({ ui_identifier: analyticsId, mastodon_status_id: status.id,