Skip to content

Commit 6b7b55d

Browse files
committed
Update pubsub_publish()
1 parent 8755609 commit 6b7b55d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

rust/hermes-ipfs/src/lib.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -515,23 +515,15 @@ impl HermesIpfs {
515515
/// * `topic` - `impl Into<String>`
516516
/// * `message` - `Vec<u8>`
517517
///
518-
/// ## Returns
519-
///
520-
/// * `Result<MessageId>`
521-
///
522518
/// ## Errors
523519
///
524520
/// Returns error if unable to publish to a pubsub topic.
525521
pub async fn pubsub_publish(
526522
&self,
527-
topic: impl Into<String>,
523+
topic: impl IntoGossipsubTopic,
528524
message: Vec<u8>,
529-
) -> anyhow::Result<MessageId> {
530-
// self.node
531-
// .pubsub_publish(topic, message)
532-
// .await
533-
// .map(std::convert::Into::into)
534-
todo!()
525+
) -> anyhow::Result<()> {
526+
self.node.pubsub_publish(topic, message).await
535527
}
536528

537529
/// Ban peer from node.

0 commit comments

Comments
 (0)