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] Implement following hashtags #3141

Merged

Conversation

VyrCossont
Copy link
Contributor

@VyrCossont VyrCossont commented Jul 26, 2024

Description

  • Adds API methods for following, unfollowing, and getting tags, and listing followed tags
  • Sends new or updated public statuses with tags to the home timelines of local accounts following those tags

Closes #2326

Comments

Followed tags have no state of their own, so we only store the association between a tag ID and an account ID. Caches mappings from a tag to accounts that follow it, and from an account to all the tags that it follows.

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.

@VyrCossont VyrCossont added enhancement New feature or request frontend-api Backend requirement for Frontend stuff labels Jul 26, 2024
@VyrCossont VyrCossont marked this pull request as draft July 26, 2024 14:36
@VyrCossont
Copy link
Contributor Author

Hashtags I thought I'd followed on my test instance aren't showing up in my home timeline when they come in on remote statuses. Switching this to draft while I investigate.

@VyrCossont VyrCossont marked this pull request as ready for review July 26, 2024 16:36
@VyrCossont
Copy link
Contributor Author

It was boost-related. Here's the situation:

  • I follow someone but I hide their boosts because they're too noisy
  • I still want to see any post that hits my instance with, say, #retrocomputing
  • they boost a post from an account that I don't follow, original post has #retrocomputing
  • the status actually being timelined in timelineAndNotifyStatus is the boost, not the original
  • I don't see boosts from the account that I follow, so I don't see the boost
  • the boost itself doesn't have any tags, so I don't see it due to following the hashtag

Fix: unwrap boosts when timelining based on post content.

@VyrCossont VyrCossont marked this pull request as draft July 26, 2024 22:04
@VyrCossont
Copy link
Contributor Author

Apparently I need to explicitly check user-user blocks; the normal followers path checks them implicitly, because there can't be a follow relationship where a block exists. Admin-level domain blocks for remote statuses should be covered by enrichStatus.

@VyrCossont VyrCossont marked this pull request as ready for review July 27, 2024 00:56
@VyrCossont
Copy link
Contributor Author

Fix is working. Hopefully that was the last missing bit.

@NyaaaWhatsUpDoc
Copy link
Member

looks good to me! great work again 😎

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc merged commit a237e2b into superseriousbusiness:main Jul 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend-api Backend requirement for Frontend stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Would be great to implement the Tags endpoints (for following hashtags and whatnot)
3 participants