diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-02 03:11:31 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-02 03:11:31 +0000 |
| commit | 401e60b98d94bc1f51dbd4b6083e92642a36efda (patch) | |
| tree | a4a78c4dc1fc291771f41994af4cf53be3aa6cf2 /test_utils/src/lib.rs | |
| parent | 1cacf1bce77b88febc0cf9e2f0f9f468d4b30555 (diff) | |
feat(repo_ref)!: align maintainers tag to nip34 style
nip34 specifies that repo event tags with multiple values wuch as
"relays" and "web" use theformat:
`["tag", "item", "item"...]`
instead of:
```
["tag", "item"],
["tag", "item"],
```
this update also adds clarity. it is not obvious that using a p tag
is intended to make the pubkey a co-maintainer.
BREAKING CHANGE: format of maintainers tags in repo events has
changed to reflect nip34 style and ngit will not detect the old
format
Diffstat (limited to 'test_utils/src/lib.rs')
| -rw-r--r-- | test_utils/src/lib.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 9996008..8788211 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs | |||
| @@ -164,8 +164,13 @@ pub fn generate_repo_ref_event() -> nostr::Event { | |||
| 164 | "ws://localhost:8056".to_string(), | 164 | "ws://localhost:8056".to_string(), |
| 165 | ], | 165 | ], |
| 166 | ), | 166 | ), |
| 167 | Tag::public_key(TEST_KEY_1_KEYS.public_key()), | 167 | Tag::Generic( |
| 168 | Tag::public_key(TEST_KEY_2_KEYS.public_key()), | 168 | nostr::TagKind::Custom("maintainers".to_string()), |
| 169 | vec![ | ||
| 170 | TEST_KEY_1_KEYS.public_key().to_string(), | ||
| 171 | TEST_KEY_2_KEYS.public_key().to_string(), | ||
| 172 | ], | ||
| 173 | ), | ||
| 169 | ], | 174 | ], |
| 170 | ) | 175 | ) |
| 171 | .to_event(&TEST_KEY_1_KEYS) | 176 | .to_event(&TEST_KEY_1_KEYS) |