mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-06-26 11:29:28 +00:00
14 lines
441 B
Nim
14 lines
441 B
Nim
|
|
proc subscribe*(
|
||
|
|
self: LogosDelivery, contentTopic: string
|
||
|
|
): Future[Result[string, string]] {.ffi.} =
|
||
|
|
(await self.messagingClient.subscribe(ContentTopic(contentTopic))).isOkOr:
|
||
|
|
return err(error)
|
||
|
|
return ok("")
|
||
|
|
|
||
|
|
proc unsubscribe*(
|
||
|
|
self: LogosDelivery, contentTopic: string
|
||
|
|
): Future[Result[string, string]] {.ffi.} =
|
||
|
|
self.messagingClient.unsubscribe(ContentTopic(contentTopic)).isOkOr:
|
||
|
|
return err(error)
|
||
|
|
return ok("")
|