Skip to content

Commit 4681338

Browse files
lin-snowclaude
andcommitted
fix(editor): restore TWEET extension data when editing an echo
The edit-mode populate switch in TheEditor.vue handled MUSIC/VIDEO/ GITHUBPROJ/WEBSITE/LOCATION but was missing a TWEET case, so tweetToAdd (url/username/statusId) was never restored. On submit, handleTweetExtension re-parsed an empty url, failed, and dropped the extension — making a tweet-only echo fail the empty check with "echo cannot be empty". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 863e11f commit 4681338

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

web/src/views/home/modules/TheEditor.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const {
4747
extensionToAdd,
4848
websiteToAdd,
4949
locationToAdd,
50+
tweetToAdd,
5051
tagToAdd,
5152
currentExtensionType,
5253
} = storeToRefs(editorStore)
@@ -123,6 +124,16 @@ const fillEditorFromEchoToUpdate = () => {
123124
: ''
124125
break
125126
}
127+
case ExtensionType.TWEET: {
128+
const payload = echoToUpdate.value.extension.payload
129+
tweetToAdd.value = {
130+
url: payload.url || '',
131+
username: payload.username || '',
132+
statusId: payload.statusId || '',
133+
}
134+
extensionToAdd.value.extension = payload.url || ''
135+
break
136+
}
126137
}
127138
}
128139

0 commit comments

Comments
 (0)