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] Add from: search operator and account_id query param #2943

Merged
merged 5 commits into from
May 31, 2024

Conversation

VyrCossont
Copy link
Contributor

Description

This pull request implements Mastodon-compatible functionality for restricting a search to statuses authored by a specific account:

  • account_id parameter to search API
  • from:localuser or from:remoteuser@domain as an additional (or only) term in search query text, useful for the majority of clients which don't support account_id (also implemented in Mastodon, documented only in online help)

There are two main use cases:

  • Find your most recent conversations with somebody else
  • Find your own posts

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.

@daenney daenney changed the title Add from: search operator and account_id query param [feature] Add from: search operator and account_id query param May 29, 2024
@tsmethurst
Copy link
Contributor

Looks deece! We should document this in the user guide somewhere. Would you mind creating a page in there and adding to mkdocs.yaml or whatever it is?

@VyrCossont
Copy link
Contributor Author

@tsmethurst no problem. I found the docs preview workflow in CONTRIBUTING.md and will add something to the user guide.

@tsmethurst tsmethurst merged commit 04bcde0 into superseriousbusiness:main May 31, 2024
2 checks passed
@tsmethurst
Copy link
Contributor

Thank you!

nyarla pushed a commit to nyarla/gotosocial-modded that referenced this pull request Jun 19, 2024
…seriousbusiness#2943)

* Add from: search operator

* Fix whitespace in Swagger YAML comment

* Move query parsing into its own method

* Document search

* Clarify post search scope
nyarla pushed a commit to nyarla/gotosocial-modded that referenced this pull request Jun 19, 2024
…seriousbusiness#2943)

* Add from: search operator

* Fix whitespace in Swagger YAML comment

* Move query parsing into its own method

* Document search

* Clarify post search scope
@VyrCossont VyrCossont deleted the search-from branch July 26, 2024 23:31
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