Skip to content

(feat): Adding Support for Multiple E and P Tags #2357

Zack Wynne requested to merge feat/nostr-filters-2357 into master

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

  1. Create a Nostr account on https://astral.ninja
  2. Add the sandbox relay and create some posts: wss://relay.minds.io/nostr/v1/ws
  3. 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:

replies

Example event:

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

Merge request reports

Loading