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

[feature] do not uncache status / emoji media if attached status is bookmarked #2956

Conversation

NyaaaWhatsUpDoc
Copy link
Member

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc commented Jun 3, 2024

Description

This allows bookmarking of statuses to act as a sort of archive of content, even if the original source happens to go offline. (though obviously this still respects status delete events).

Also adds caches for status bookmarks and bookmark IDs.

Checklist

  • I/we have read the GoToSocial contribution guidelines.
  • I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
  • I/we have not leveraged AI to create the proposed changes.
  • I/we have performed a self-review of added code.
  • I/we have written code that is legible and maintainable by others.
  • I/we have commented the added code, particularly in hard-to-understand areas.
  • I/we have made any necessary changes to documentation.
  • I/we have added tests that cover new code.
  • I/we have run tests and they pass locally with the changes.
  • I/we have run go fmt ./... and golangci-lint run.

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc force-pushed the feature/dont-uncache-bookmarked-status-media-or-emojis branch from 45c8875 to 97a164f Compare June 4, 2024 10:46
@NyaaaWhatsUpDoc NyaaaWhatsUpDoc marked this pull request as ready for review June 4, 2024 11:06
@NyaaaWhatsUpDoc
Copy link
Member Author

okay i have no idea what on earth is going on with the test runner on this PR lol

locally, the tests do pass :p

@tsmethurst
Copy link
Contributor

Looks good to me :) Think this can be squerged once tests pass (it's just envparsing that needs to be fixed now).

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc force-pushed the feature/dont-uncache-bookmarked-status-media-or-emojis branch from c80b52f to ed0cec8 Compare June 6, 2024 10:15
@NyaaaWhatsUpDoc NyaaaWhatsUpDoc merged commit 5dcc954 into superseriousbusiness:main Jun 6, 2024
2 checks passed
nyarla pushed a commit to nyarla/gotosocial-modded that referenced this pull request Jun 19, 2024
…ookmarked (superseriousbusiness#2956)

* do not uncache status / emoji media if attached status is bookmarked

* add status bookmark and bookmark IDs caches

* update status bookmark tests

* move IsStatusBookmarkedBy() to StatusBookmark{} interface, rely on cache

* fix envparsing.sh test
nyarla pushed a commit to nyarla/gotosocial-modded that referenced this pull request Jun 19, 2024
…ookmarked (superseriousbusiness#2956)

* do not uncache status / emoji media if attached status is bookmarked

* add status bookmark and bookmark IDs caches

* update status bookmark tests

* move IsStatusBookmarkedBy() to StatusBookmark{} interface, rely on cache

* fix envparsing.sh test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants