mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
refine definition of Subscribe to prevent subscription in None and Disabled states
This commit is contained in:
@@ -134,7 +134,15 @@ data Command res (from :: Participant) (to :: Participant) state state' :: Type
|
||||
('None <==> 'None <==| s)
|
||||
('New <==> 'New <==| s)
|
||||
|
||||
Subscribe :: Command () 'Recipient 'Broker state state -- TODO
|
||||
Subscribe :: ( (r == 'None) ~ 'False
|
||||
, (r == 'Disabled) ~ 'False
|
||||
, (b == 'None) ~ 'False
|
||||
, (b == 'Disabled) ~ 'False
|
||||
, Prf HasState 'Sender s )
|
||||
=> Command ()
|
||||
'Recipient 'Broker
|
||||
(r <==> b <==| s)
|
||||
(r <==> b <==| s)
|
||||
|
||||
SendInvite :: Prf HasState 'Broker s
|
||||
=> String -- invitation - TODO
|
||||
|
||||
Reference in New Issue
Block a user