mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-14 22:36:21 +00:00
Subscribe recipient command stub
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
module Simplex.Messaging.Client where
|
||||
|
||||
import ClassyPrelude
|
||||
import Data.Singletons.TH
|
||||
import Simplex.Messaging.Protocol
|
||||
import Simplex.Messaging.Types
|
||||
|
||||
@@ -26,8 +27,28 @@ instance Prf HasState Sender s
|
||||
action = CreateConn
|
||||
protoAction = rCreateConn
|
||||
|
||||
instance ( (r /= None && r /= Disabled) ~ True
|
||||
, (b /= None && b /= Disabled) ~ True
|
||||
, Prf HasState Sender s )
|
||||
=> ProtocolActionOf Recipient
|
||||
() ()
|
||||
Recipient Broker
|
||||
(r <==> b <==| s)
|
||||
(r <==> b <==| s)
|
||||
Idle Subscribed n n
|
||||
where
|
||||
action = Subscribe
|
||||
protoAction = rSubscribe
|
||||
|
||||
|
||||
rCreateConn :: Connection Recipient None Idle
|
||||
-> CreateConnRequest
|
||||
-> Either String CreateConnResponse
|
||||
-> Either String (Connection Recipient New Idle)
|
||||
rCreateConn = protoActionStub
|
||||
|
||||
rSubscribe :: Connection Recipient s Idle
|
||||
-> ()
|
||||
-> Either String ()
|
||||
-> Either String (Connection Recipient s Subscribed)
|
||||
rSubscribe = protoActionStub
|
||||
|
||||
Reference in New Issue
Block a user