Skip to content

Paste-to-attach: accepting an already-attached URL duplicates the attachment #343

Description

@dmnyc

From the review of #341.

The paste offer's onAttachUrl pushes into draft.media unconditionally (compose.js ~813 and the panel's twin). Paste the same image URL a second time and accept again → two identical thumbnails, and the published note appends the URL twice (plus two imeta tags for one image).

Fix shape: accepting a URL that draft.media already holds should convert — remove the URL from the prose and keep the existing entry (and its description) — not add a second. Optionally the offer itself could read "Already attached" and simply take the prose line out, which is the same act with honest copy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions