Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Integration with Pinboard: Preserve Existing Bookmarks #2711

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

ztec
Copy link
Contributor

@ztec ztec commented Jun 25, 2024

The Issue:
When saving an entry that is already bookmarked on Pinboard,
Miniflux was overriding all existing data on Pinboard. This action
removed any extended content or, worse, changed the private settings
to public, making previously private bookmarks publicly available.

The Fix:
Now, upon saving an entry as a bookmark, I first fetch it. If it
already exists, I apply the necessary modifications (adding tags and any state)
that Miniflux would have normally done, then add it again. This way, no
data is lost in the process. Pinboard has a stable API, so I don't anticipate
any new fields being added soon.

I manually tested the integration by hitting the save button in the following situations:

  • Entry URL does not exist on Pinboard:
    • Bookmark is properly added on Pinboard with tags and "to read" status according to Miniflux settings.
  • Entry URL already exists on Pinboard:
    • Existing data remains unchanged.
    • Tags from Miniflux settings are properly added to the bookmark.
    • "To read" status is set to yes when the option is checked in Miniflux. Nothing is changed otherwise.

Do you follow the guidelines?

@ztec ztec force-pushed the integrations/pinboard/NoMoreOverriding branch 5 times, most recently from 177bb53 to 1e6a982 Compare June 25, 2024 15:38
@ztec ztec changed the title Fix:interation:Pinboard Do not override existing bookmarks Fix: Integration with Pinboard: Preserve Existing Bookmarks Jun 25, 2024
@ztec ztec force-pushed the integrations/pinboard/NoMoreOverriding branch 2 times, most recently from 3c59bd3 to 0cc03b4 Compare June 25, 2024 15:43
The Issue:
When saving an entry that is already bookmarked on Pinboard,
Miniflux was overriding all existing data on Pinboard. This action
removed any extended content or, worse, changed the private settings
to public, making previously private bookmarks publicly available.

The Fix:
Now, upon saving an entry as a bookmark, I first fetch it. If it
already exists, I apply the necessary modifications (adding tags and any state)
that Miniflux would have normally done, then add it again. This way, no
data is lost in the process. Pinboard has a stable API, so I don't anticipate
any new fields being added soon.

I manually tested the integration by hitting the save button in the following situations:
- Entry URL does not exist on Pinboard:
  - Bookmark is properly added on Pinboard with tags and "to read" status according to Miniflux settings.
- Entry URL already exists on Pinboard:
  - Existing data remains unchanged.
  - Tags from Miniflux settings are properly added to the bookmark.
  - "To read" status is set to yes when the option is checked in Miniflux. Nothing is changed otherwise.
@ztec ztec force-pushed the integrations/pinboard/NoMoreOverriding branch from 0cc03b4 to 093a524 Compare June 25, 2024 15:50
@ztec ztec marked this pull request as ready for review June 25, 2024 23:31
@fguillot fguillot merged commit 4498ba1 into miniflux:main Jun 29, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants