File tree Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 33
33
34
34
### Added
35
35
36
+ * nostr: add ` EventBuilder::interest_set ` ([ Yuki Kishimoto] )
36
37
* book: add some python examples ([ RydalWater] )
37
38
38
39
### Fixed
Original file line number Diff line number Diff line change @@ -734,6 +734,16 @@ impl EventBuilder {
734
734
}
735
735
}
736
736
737
+ /// Interest set
738
+ ///
739
+ /// <https://github.com/nostr-protocol/nips/blob/master/51.md>
740
+ #[ uniffi:: constructor]
741
+ pub fn interest_set ( hashtags : Vec < String > ) -> Self {
742
+ Self {
743
+ inner : nostr:: EventBuilder :: interest_set ( hashtags) ,
744
+ }
745
+ }
746
+
737
747
/// Emoji set
738
748
///
739
749
/// <https://github.com/nostr-protocol/nips/blob/master/51.md>
Original file line number Diff line number Diff line change @@ -751,6 +751,16 @@ impl JsEventBuilder {
751
751
}
752
752
}
753
753
754
+ /// Interest set
755
+ ///
756
+ /// <https://github.com/nostr-protocol/nips/blob/master/51.md>
757
+ #[ wasm_bindgen( js_name = interestSet) ]
758
+ pub fn interest_set ( hashtags : Vec < String > ) -> Self {
759
+ Self {
760
+ inner : EventBuilder :: interest_set ( hashtags) ,
761
+ }
762
+ }
763
+
754
764
/// Emoji set
755
765
///
756
766
/// <https://github.com/nostr-protocol/nips/blob/master/51.md>
Original file line number Diff line number Diff line change @@ -1570,6 +1570,22 @@ impl EventBuilder {
1570
1570
)
1571
1571
}
1572
1572
1573
+ /// Interest set
1574
+ ///
1575
+ /// <https://github.com/nostr-protocol/nips/blob/master/51.md>
1576
+ #[ inline]
1577
+ pub fn interest_set < I , S > ( hashtags : I ) -> Self
1578
+ where
1579
+ I : IntoIterator < Item = S > ,
1580
+ S : Into < String > ,
1581
+ {
1582
+ Self :: new (
1583
+ Kind :: InterestSet ,
1584
+ "" ,
1585
+ hashtags. into_iter ( ) . map ( |t| Tag :: hashtag ( t) ) ,
1586
+ )
1587
+ }
1588
+
1573
1589
/// Emoji set
1574
1590
///
1575
1591
/// <https://github.com/nostr-protocol/nips/blob/master/51.md>
You can’t perform that action at this time.
0 commit comments