Relay positive answers to invitations too, to simplify games list handling from client
This commit is contained in:
parent
0fa50ffb28
commit
65da786c69
1 changed files with 3 additions and 2 deletions
|
@ -50,8 +50,9 @@ receive invitation@(Message.Invitation {Message.to}) (Just _) =
|
||||||
receive answer@(Message.Answer {Message.accept, Message.to}) (Just player) =
|
receive answer@(Message.Answer {Message.accept, Message.to}) (Just player) =
|
||||||
if accept
|
if accept
|
||||||
then do
|
then do
|
||||||
game <- Game.new (Player.playerID player, to)
|
publicGames <- Game.new (Player.playerID player, to)
|
||||||
Messaging.notifyPlayers game []
|
Messaging.relay answer (Messaging.sendTo [to])
|
||||||
|
Messaging.notifyPlayers publicGames
|
||||||
else Messaging.relay answer (Messaging.sendTo [to])
|
else Messaging.relay answer (Messaging.sendTo [to])
|
||||||
|
|
||||||
receive (Message.Play {Message.move, Message.onGame}) (Just player) = do
|
receive (Message.Play {Message.move, Message.onGame}) (Just player) = do
|
||||||
|
|
Loading…
Add table
Reference in a new issue