Change message button type in send message

This commit is contained in:
Gabor PEK 2020-06-22 13:43:55 +02:00
parent d92f3da04d
commit 2f9aa9c298
2 changed files with 7 additions and 7 deletions

View File

@ -12,10 +12,10 @@
<div class="tfw-message-btn-divider"></div>
<div class="tfw-message-btn">
<button *ngFor="let button of message.buttons"
class="{{button}}"
(click)="sendButtonCommand(button)">
{{buttonMap[button].caption}}
<button *ngFor="let messageButton of message.buttons"
class="{{messageButton}}"
(click)="sendButtonCommand(messageButton)">
{{buttonMap[messageButton].caption}}
</button>
</div>
</div>

View File

@ -79,10 +79,10 @@ export class MessagesComponent implements OnInit {
}
}
sendButtonCommand(button: string) {
sendButtonCommand(messageButton: MessageButton) {
this.websocketService.send({
'key': 'button.click',
'value': button
'key': 'message.button.click',
'value': messageButton
});
}
}