From the review of #341.
Nothing prevents attaching images and then tapping Poll: the Poll button hides for replies (pollAdd.classList.toggle('hidden', … || !!replyTo)) but not when draft.media is non-empty, and adding a poll does not clear media. doPublish pushes imetaTagsForMedia(draft.media) before the asPoll branch, so the result is a kind:1068 whose content carries appended image URLs and imeta tags — a shape the code comment near the tag push explicitly claims cannot arrive, and one no NIP-88 client renders.
Fix shape: the reply guard's pattern — hide the Poll button when draft.media.length is non-empty (and vice versa is already fine: attaching to an open poll draft should either be refused or close the poll). Decide which direction wins; a poll's body is its question, so media yielding to the poll is the natural reading.
From the review of #341.
Nothing prevents attaching images and then tapping Poll: the Poll button hides for replies (
pollAdd.classList.toggle('hidden', … || !!replyTo)) but not whendraft.mediais non-empty, and adding a poll does not clear media.doPublishpushesimetaTagsForMedia(draft.media)before theasPollbranch, so the result is a kind:1068 whose content carries appended image URLs and imeta tags — a shape the code comment near the tag push explicitly claims cannot arrive, and one no NIP-88 client renders.Fix shape: the reply guard's pattern — hide the Poll button when
draft.media.lengthis non-empty (and vice versa is already fine: attaching to an open poll draft should either be refused or close the poll). Decide which direction wins; a poll's body is its question, so media yielding to the poll is the natural reading.