File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export class PokersGateway implements OnGatewayInit {
110110
111111 const vote = this . pokersService . getVote ( client , message . poker ) ;
112112 if ( vote ) {
113- client . emit ( "myVote" , { currentValue : vote . currentValue , initialValue : vote . initialValue } ) ;
113+ client . emit ( "myVote" , { currentVote : vote . currentValue , initialVote : vote . initialValue } ) ;
114114 }
115115
116116 this . send ( message . poker , { members : true , votes : true } ) ;
@@ -128,10 +128,11 @@ export class PokersGateway implements OnGatewayInit {
128128 this . pokersService . castVote ( client , message . poker , message . vote ) ;
129129
130130 // Send this vote to all sockets for the current user.
131+ const vote = this . pokersService . getVote ( client , message . poker ) ;
131132 const socketIds = this . pokersService . getUserSockets ( this . pokersService . getUserId ( client ) ) ;
132- const vote = this . pokersService . getVote ( client , message . poker ) ;
133+
133134 for ( const socketId of socketIds ) {
134- this . server . sockets [ socketId ] . emit ( "myVote" , { currentValue : vote . currentValue , initialValue : vote . initialValue } ) ;
135+ this . server . sockets [ socketId ] . emit ( "myVote" , { currentVote : vote . currentValue , initialVote : vote . initialValue } ) ;
135136 }
136137
137138 this . send ( message . poker , { votes : true } ) ;
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ export default {
6262 }
6363 },
6464 myVote ( msg ) {
65- this .setVote ( msg .currentValue );
66- this .myInitialVote = msg .initialValue ;
65+ this .setVote ( msg .currentVote );
66+ this .myInitialVote = msg .initialVote ;
6767 },
6868 },
6969};
You can’t perform that action at this time.
0 commit comments