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) =
|
||||
if accept
|
||||
then do
|
||||
game <- Game.new (Player.playerID player, to)
|
||||
Messaging.notifyPlayers game []
|
||||
publicGames <- Game.new (Player.playerID player, to)
|
||||
Messaging.relay answer (Messaging.sendTo [to])
|
||||
Messaging.notifyPlayers publicGames
|
||||
else Messaging.relay answer (Messaging.sendTo [to])
|
||||
|
||||
receive (Message.Play {Message.move, Message.onGame}) (Just player) = do
|
||||
|
|
Loading…
Reference in a new issue