New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simplify chat protocol #74
Conversation
<|> ("/group #" <|> "/g #") *> (NewGroup <$> groupRef) | ||
<|> ("/add #" <|> "/a #") *> (AddMember <$> groupRef <* A.space <*> contactRef <* A.space <*> memberRole) | ||
<|> ("/remove #" <|> "/rm #") *> (RemoveMember <$> groupRef <* A.space <*> contactRef) | ||
<|> ("/delete #" <|> "/d #") *> (DeleteGroup <$> groupRef) | ||
<|> ("/members #" <|> "/ms #") *> (ListMembers <$> groupRef) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a critique, just a thought - maybe we could have a subcommand for group commands (e.g. instead of "#" - /group new
, /group add
, /group remove
, etc.), so that it's harder to mix up groups and regular contacts namespaces? also maybe move group ChatCommands under GroupCommand which is also a ChatCommand but has different constructors of its own to somewhat separate group commands on types level as well? I'm not sure of benefits other than clearer distinction between group and contact commands on types and parsers, but I just felt it starts to feel somewhat crowded in ChatCommands and probably will only become more so. For example if we later introduce something like "Service" or "Configuration commands" letting client to control app - they'd also be mixed into the same ChatCommands namespace. Instead we could have separate namespaces for them, groups, actually regular contacts as well, and maybe others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will think about it... not needed at the moment
No description provided.