Skip to content

Commit 73044ae

Browse files
committed
nostr: make EventBuilder::reaction target arg generic over ReactionTarget type
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 6738f57 commit 73044ae

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/nostr/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
- NIP-47 fields synchronized with current specs (https://github.com/rust-nostr/nostr/pull/1021)
6767
- Check that `a`/`A` and `k`/`K` tags have the same event kind in NIP-22 events (https://github.com/rust-nostr/nostr/pull/1035)
6868
- Deserialize NIP-47 empty strings as `None` (https://github.com/rust-nostr/nostr/pull/1079)
69+
- Make `EventBuilder::reaction` target arg generic over `ReactionTarget` type
6970

7071
### Deprecated
7172

crates/nostr/src/event/builder.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,11 +845,12 @@ impl EventBuilder {
845845
///
846846
/// <https://github.com/nostr-protocol/nips/blob/master/25.md>
847847
#[inline]
848-
pub fn reaction<S>(target: ReactionTarget, reaction: S) -> Self
848+
pub fn reaction<T, S>(target: T, reaction: S) -> Self
849849
where
850+
T: Into<ReactionTarget>,
850851
S: Into<String>,
851852
{
852-
Self::new(Kind::Reaction, reaction).tags(target.into_tags())
853+
Self::new(Kind::Reaction, reaction).tags(target.into().into_tags())
853854
}
854855

855856
/// Create a new channel

0 commit comments

Comments
 (0)