aboutsummaryrefslogtreecommitdiff
path: root/src/Ssb/Peer
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ssb/Peer')
-rw-r--r--src/Ssb/Peer/RPC.hs2
-rw-r--r--src/Ssb/Peer/RPC/Room.hs3
-rw-r--r--src/Ssb/Peer/RPC/WhoAmI.hs2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/Ssb/Peer/RPC.hs b/src/Ssb/Peer/RPC.hs
index 3286a33..1336b5e 100644
--- a/src/Ssb/Peer/RPC.hs
+++ b/src/Ssb/Peer/RPC.hs
@@ -3,7 +3,7 @@
module Ssb.Peer.RPC where
-import Protolude
+import Protolude hiding (Handler)
import Control.Concurrent.STM
import Control.Monad.Fail
diff --git a/src/Ssb/Peer/RPC/Room.hs b/src/Ssb/Peer/RPC/Room.hs
index 1f53cf0..7be7d2c 100644
--- a/src/Ssb/Peer/RPC/Room.hs
+++ b/src/Ssb/Peer/RPC/Room.hs
@@ -280,7 +280,8 @@ instance RPC.Handler Room where
-- should decode request
serve h (RPC.Endpoint ["tunnel", "connect"] RPC.Duplex) args stream = do
let args' =
- decodeJSON (toS $ Aeson.encode args) :: Either
+ -- TODO: why encode to JSON then decode from JSON redundantly?
+ decodeJSON (encodeJSON args) :: Either
Text
[ConnectRequest]
case args' of
diff --git a/src/Ssb/Peer/RPC/WhoAmI.hs b/src/Ssb/Peer/RPC/WhoAmI.hs
index be979fc..c92c56c 100644
--- a/src/Ssb/Peer/RPC/WhoAmI.hs
+++ b/src/Ssb/Peer/RPC/WhoAmI.hs
@@ -7,7 +7,7 @@
module Ssb.Peer.RPC.WhoAmI where
-import Protolude hiding ( Identity )
+import Protolude hiding ( Handler, Identity )
import Data.Aeson as Aeson (FromJSON,ToJSON)
import qualified Ssb.Identity as Ssb