(fix): adding check that userGuids are present prior to querying ES for Nostr #2357
Ticket(s) / Related Merge Requests
Issue: #2357 (closed)
Summary of Changes
This MR fixes the issue of returning posts from users not requested in the request provided by the Nostr client. Since we only pull the userGuids for users that have a source other than "nostr", if the client requests only Nostr authors we send a query to ES with a null list which causes posts to be retrieved from multiple authors.
Testing Considerations
First, attempt this query against production (wss://relay.minds.com/nostr/v1/ws):
["REQ","subscription",{"authors":["36cb1113be1c14ef3026f42b565f33702776a5255985b78a38233c996c22f46b"]}]
You should get results from several authors, which is not desired.
Try against sandbox (wss://relay.minds.io/nostr/v1/ws), and you should only get posts from this public key.
Deployment Considerations
Deploying this change to staging will activate the changes for Production as our relay currently is targeting the staging K8s service.
Regression Scope
This should affect the Nostr endpoints only.
Platform Affected (web, mobile, etc)
Web
Developer Testing Completed
Tested the above steps.
Screenshots / Screen Recording
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out