This adds a way to construct filters and match them against notes. This
will be used by our query interface in the future.
Signed-off-by: William Casarin <jb55@jb55.com>
This includes the new profile fetched_at logic and reaction stats.
When receiving new profiles, nostrdb will record when it was last
received in a new database. This database is a mapping from Pubkey to
timestamp.
You can manually read/write to this table using:
ndb_read_last_profile_fetch
ndb_write_last_profile_fetch
This patch also includes the new reaction counting metadata table. It is
not used yet (but reactions are still counted!)
Changelog-Added: Added reaction counters to nostrdb
Changelog-Added: Record when profile is last fetched in nostrdb
Since we can't mutate NdbNotes, let's update the existing codebase to
generate and sign ids on NostrEvent constructions. This will allow us to
match NdbNote's constructor