(feat): Adding Support for Multiple E and P Tags #2357
Ticket(s) / Related Merge Requests
Issue: #2357 (closed)
Summary of Changes
This MR creates separate tables for e and p tags, allowing for multiple of each tag for an event. I also included support for since
and until
, along with limit
.
Testing Considerations
- Create a Nostr account on https://astral.ninja
- Add the sandbox relay and create some posts:
wss://relay.minds.io/nostr/v1/ws
- In particular, you can now have reply threads.
Deployment Considerations
These tables need to be created before deployment:
CREATE TABLE IF NOT EXISTS nostr_replies (
id varchar(64),
event_id varchar(64),
relay_url text,
marker text,
FOREIGN KEY (id) REFERENCES nostr_events(id),
PRIMARY KEY (id, event_id)
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS nostr_mentions (
id varchar(64),
pubkey varchar(64),
FOREIGN KEY (id) REFERENCES nostr_events(id),
PRIMARY KEY (id, pubkey)
) ENGINE=InnoDB;
Regression Scope
Nostr relay
Platform Affected (web, mobile, etc)
Web
Developer Testing Completed
Tested creating threads in sandbox, also tested that limits work correctly.
Screenshots / Screen Recording
Example thread:
Example event:
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
Edited by Zack Wynne