You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/immortal/code/database.md
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,8 @@ Each nostr event kind has a different collection on mongo db database. This help
10
10
11
11
## Queries
12
12
13
-
When immortal wants to query something from mongo db, its basically a filter. The immortal turns the normal filter and makes `n` mongo queries. `n` is the number of kind numbers in filter. it would attach the whole conditions of filter to each query and execute the queries. Currently queries are sent separately which is inefficient, we are working on it to support batch queries or increase the performance.
14
-
15
-
> The special case is when someone requests a filter without kinds field, in this case immortal makes a request to some papular collections like reactions, short text notes, zaps and some more.
13
+
When immortal wants to query something from mongo db, its basically a filter. The immortal turns the normal filter and makes `n` mongo queries. Then we use the mongo db aggregation pipeline and `$unionWith` stage to query all requested collections. If you kinds was provided it will query all tables.
16
14
17
15
## Deleting
18
16
19
-
To delete some document for a NIP-09 request or Expiration or operator order from manager, we make ALL fields removed (not empty!) and we only keep the id of event. this helps us to prevent an deleted event be rewritten.
17
+
To delete some document for a NIP-09 request or Expiration or operator order from manager, we set all fields `null` using `$unset` mongo command and we only keep the `id` of event. this helps us to prevent an deleted event be rewritten or returned to user.
> Relay will send the id in the header of `x-identifier` in each request to manager. this helps the manager to know who is talking with and take different actions for same request but different relays.
42
42
43
-
### getConfig
43
+
### GetParameters
44
44
45
45
Relays will call this endpoint to get the parameters config from manager which requires the `x-identifier` header as well.
46
46
47
47
Request example:
48
48
49
49
```proto
50
50
// Empty request used for methods that do not require parameters.
Copy file name to clipboardExpand all lines: docs/immortal/managment/manager.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ sidebar_position: 2
4
4
5
5
# Manager
6
6
7
-
This section contains the information about the manager rules and responsibilities. To findout how relays interact with manager and vice versa you can check the [APIs](./apis.md) section.
7
+
This section contains the information about the manager rules and responsibilities. To find out how relays interact with manager and vice versa you can check the [APIs](./apis.md) section.
Copy file name to clipboardExpand all lines: docs/immortal/nips/nip-09.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,3 +5,5 @@ sidebar_position: 2
5
5
# NIP-09
6
6
7
7
The NIP-09 follows normal NIP-09 from NIPs repository and also supports filter tag requests from this document: https://github.com/nostr-protocol/nips/pull/1509.
Copy file name to clipboardExpand all lines: docs/immortal/nips/nip-56.md
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,5 +4,4 @@ sidebar_position: 4
4
4
5
5
# NIP-56
6
6
7
-
Reports are supported on immortal but it won't be processed by relays code and relays only store and broadcast them. The manager will read the report events from database and list them for operator review. There is no support for trusted moderators at the moment.
8
-
7
+
Reports are supported on immortal but it won't be processed by relays code and relays only store and broadcast them. The manager will receive them from immortal instances through gRPC calls. There is no support for trusted moderators at the moment.
0 commit comments