Skip to content

Commit

Permalink
nostr: add Kind::Comment
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
reyamir authored and yukibtc committed Nov 10, 2024
1 parent ebac9ab commit 78e77c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
### Added

* nostr: add `SingleLetterTag::as_str` and `TagKind::as_str` ([Yuki Kishimoto])
* nostr: add `Kind::Comment` ([reyamir])

### Fixed

Expand Down
4 changes: 4 additions & 0 deletions bindings/nostr-sdk-ffi/src/protocol/event/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ pub enum KindEnum {
Repost,
/// Generic Repost (NIP18)
GenericRepost,
/// Comment (NIP22)
Comment,
/// Reaction (NIP25)
Reaction,
/// Badge Award (NIP58)
Expand Down Expand Up @@ -352,6 +354,7 @@ impl From<nostr::Kind> for KindEnum {
nostr::Kind::EventDeletion => Self::EventDeletion,
nostr::Kind::Repost => Self::Repost,
nostr::Kind::GenericRepost => Self::GenericRepost,
nostr::Kind::Comment => Self::Comment,
nostr::Kind::Reaction => Self::Reaction,
nostr::Kind::BadgeAward => Self::BadgeAward,
nostr::Kind::ChannelCreation => Self::ChannelCreation,
Expand Down Expand Up @@ -438,6 +441,7 @@ impl From<KindEnum> for nostr::Kind {
KindEnum::EventDeletion => Self::EventDeletion,
KindEnum::Repost => Self::Repost,
KindEnum::GenericRepost => Self::GenericRepost,
KindEnum::Comment => Self::Comment,
KindEnum::Reaction => Self::Reaction,
KindEnum::BadgeAward => Self::BadgeAward,
KindEnum::ChannelCreation => Self::ChannelCreation,
Expand Down
1 change: 1 addition & 0 deletions crates/nostr/src/event/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ kind_variants! {
EventDeletion => 5, "Event Deletion (NIP09)",
Repost => 6, "Repost (NIP18)",
GenericRepost => 16, "Generic Repost (NIP18)",
Comment => 1111, "Comment (NIP22)",
Reaction => 7, "Reaction (NIP25)",
BadgeAward => 8, "Badge Award (NIP58)",
ChannelCreation => 40, "Channel Creation (NIP28)",
Expand Down

0 comments on commit 78e77c4

Please sign in to comment.