[websockets] remark on UserSource/UserAction

parent 914fd977
Pipeline #6081 failed with stages
in 6 minutes and 9 seconds
...@@ -62,6 +62,14 @@ data UpdateAction = ...@@ -62,6 +62,14 @@ data UpdateAction =
UpdateTree NodeId UpdateTree NodeId
deriving (Eq, Show) deriving (Eq, Show)
-- NOTE: I'm not sure if UserAction/UserSource is needed. I initially
-- created that to mark who initiated the action, but I think we don't
-- need it.
--
-- Suppose we send an 'UpdateTree node_id' message: from the DB we can
-- infer all users that are associated with that node (I do keep in
-- mind that we can share nodes to other users).
data UserSource = data UserSource =
USUser UserId USUser UserId
| USSystem | USSystem
...@@ -72,7 +80,8 @@ data UserSource = ...@@ -72,7 +80,8 @@ data UserSource =
data UserAction = data UserAction =
UserAction UserSource UpdateAction UserAction UserSource UpdateAction
deriving (Eq, Show) deriving (Eq, Show)
-- | Represents a notification that goes to a given user. This is -- | Represents a notification that goes to a given user. This is
-- directly sent via WebSockets. -- directly sent via WebSockets.
data UserNotification = data UserNotification =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment