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-divider"></div>
<div class="tfw-message-btn"> <div class="tfw-message-btn">
<button *ngFor="let button of message.buttons" <button *ngFor="let messageButton of message.buttons"
class="{{button}}" class="{{messageButton}}"
(click)="sendButtonCommand(button)"> (click)="sendButtonCommand(messageButton)">
{{buttonMap[button].caption}} {{buttonMap[messageButton].caption}}
</button> </button>
</div> </div>
</div> </div>

View File

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