Add the recipient in the answer messages (following latest changes in the protocol)
This commit is contained in:
parent
c2b01445c8
commit
064606ae83
1 changed files with 3 additions and 3 deletions
|
@ -70,11 +70,11 @@ answer (Message.Relay {Message.from, Message.message = Message.LogIn {Message.na
|
||||||
| from == key = return $ LoggedIn {key, name}
|
| from == key = return $ LoggedIn {key, name}
|
||||||
|
|
||||||
answer (Message.Relay {Message.from, Message.message = Message.Invitation {}}) (LoggedIn {key, name}) = do
|
answer (Message.Relay {Message.from, Message.message = Message.Invitation {}}) (LoggedIn {key, name}) = do
|
||||||
send $ Message.Answer {Message.accept = True}
|
send $ Message.Answer {Message.accept = True, Message.to = from}
|
||||||
return $ Playing {key, name, against = from}
|
return $ Playing {key, name, against = from}
|
||||||
|
|
||||||
answer (Message.Relay {Message.message = Message.Invitation {}}) state = do
|
answer (Message.Relay {Message.from, Message.message = Message.Invitation {}}) state = do
|
||||||
send $ Message.Answer {Message.accept = False}
|
send $ Message.Answer {Message.accept = False, Message.to = from}
|
||||||
return state
|
return state
|
||||||
|
|
||||||
answer message@(Message.Game {Message.logs}) state@(Playing {key, name}) = do
|
answer message@(Message.Game {Message.logs}) state@(Playing {key, name}) = do
|
||||||
|
|
Loading…
Reference in a new issue