Skip to content

Commit

Permalink
bindings: remove nip53 module
Browse files Browse the repository at this point in the history
Closes #648

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
  • Loading branch information
yukibtc committed Jan 8, 2025
1 parent c387d38 commit e70ee22
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 721 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
* bindings: cleanup `EventBuilder` methods ([Yuki Kishimoto])
* bindings: remove `nip13`, `nip15` and `nip51` modules ([Yuki Kishimoto])
* bindings: remove `nip26` and `nip94` modules ([Yuki Kishimoto])
* bindings: remove `nip53` module ([Yuki Kishimoto])

### Deprecated

Expand Down
8 changes: 4 additions & 4 deletions bindings/nostr-sdk-ffi/src/protocol/event/tag/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::sync::Arc;
use nostr::event::tag::list;
use uniffi::Object;

use super::{Tag, TagKind, TagStandard};
use super::{standard, Tag, TagKind, TagStandard};
use crate::protocol::event::{EventId, PublicKey, Timestamp};
use crate::protocol::nips::nip01::Coordinate;

Expand Down Expand Up @@ -77,7 +77,7 @@ impl Tags {
self.inner
.find_standardized(kind.into())
.cloned()
.map(|t| t.into())
.and_then(standard::convert)
}

/// Get first tag that match `TagKind`.
Expand All @@ -94,7 +94,7 @@ impl Tags {
self.inner
.filter_standardized(kind.into())
.cloned()
.map(|t| t.into())
.filter_map(standard::convert)
.collect()
}

Expand Down Expand Up @@ -152,6 +152,6 @@ impl Tags {
///
/// This method extract ONLY supported standard variants
pub fn hashtags(&self) -> Vec<String> {
self.inner.hashtags().map(|t| t.to_owned()).collect()
self.inner.hashtags().map(|t| t.to_string()).collect()
}
}
5 changes: 4 additions & 1 deletion bindings/nostr-sdk-ffi/src/protocol/event/tag/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ impl Tag {

/// Get standardized tag
pub fn as_standardized(&self) -> Option<TagStandard> {
self.inner.as_standardized().cloned().map(|t| t.into())
self.inner
.as_standardized()
.cloned()
.and_then(standard::convert)
}

/// Get array of strings
Expand Down
Loading

0 comments on commit e70ee22

Please sign in to comment.