Yuki Kishimoto on Nostr: There is a method on the database that allow to check where an event ID was seen: ...
There is a method on the database that allow to check where an event ID was seen:
```rust
let database = client.database();
let relays = database.event_seen_on_relays(id).await?;
```
This works with the in-memory database (which is used by default) and with some persistent database but not with all implementations (like with nostrdb).
Another good solution is to use the `RelayPoolNotification`, like suggested by
dluvian (nprofile…ru2a)Published at
2024-12-23 19:37:41Event JSON
{
"id": "7798cbe6b88de6eaec31c6233a6eeb7127b7bb4090ed1b2b23870e7e73706ada",
"pubkey": "68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272",
"created_at": 1734982661,
"kind": 1,
"tags": [
[
"e",
"f14982d919542431a0447849038736d683d816abe959de409fe416cedbc5a16a",
"",
"root"
],
[
"p",
"68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272"
],
[
"p",
"d04ecf33a303a59852fdb681ed8b412201ba85d8d2199aec73cb62681d62aa90"
],
[
"p",
"e4336cd525df79fa4d3af364fd9600d4b10dce4215aa4c33ed77ea0842344b10",
"",
"mention"
],
[
"r",
"client.database"
],
[
"r",
"database.event"
]
],
"content": "There is a method on the database that allow to check where an event ID was seen:\n\n```rust\nlet database = client.database();\nlet relays = database.event_seen_on_relays(id).await?;\n```\n\nThis works with the in-memory database (which is used by default) and with some persistent database but not with all implementations (like with nostrdb).\n\nAnother good solution is to use the `RelayPoolNotification`, like suggested by nostr:nprofile1qqswgvmv65ja7706f5a0xe8ajcqdfvgdeeppt2jvx0kh06sggg6ykyqppemhxue69uhkummn9ekx7mp0qys8wumn8ghj7mn0wd68ytn9d9h82mny0fmkzmn6d9njuumsv93k2tcpr4mhxue69uhkummnw3ezucnfw33k76twv4ezuum0vd5kzmp0v9ru2a",
"sig": "3a0edf2b86fe290b688122d84199932b44c53cbe782badb2b61e2eeffd434020869d7552e10496541a2170fd310ae596f54e54ca0f4695dcaaba01d87bb23928"
}