Skip to content

Commit 15d19f6

Browse files
authored
resolves theopenconversationkit#186 add and forward style to Postback and url buttons (theopenconversationkit#187)
Co-authored-by: kbvi <[email protected]>
1 parent 54b708d commit 15d19f6

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

src/model/buttons.ts

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ export class QuickReply {
55
imageUrl?: string;
66

77
constructor(
8-
label: string,
9-
payload: string,
10-
nlpText?: string,
11-
imageUrl?: string,
8+
label: string,
9+
payload: string,
10+
nlpText?: string,
11+
imageUrl?: string,
1212
) {
1313
this.label = label;
1414
this.payload = payload;
@@ -21,11 +21,18 @@ export class PostBackButton {
2121
label: string;
2222
payload?: string;
2323
imageUrl?: string;
24+
style?: string;
2425

25-
constructor(label: string, payload: string, imageUrl?: string) {
26+
constructor(
27+
label: string,
28+
payload: string,
29+
imageUrl?: string,
30+
style?: string,
31+
) {
2632
this.label = label;
2733
this.payload = payload;
2834
this.imageUrl = imageUrl;
35+
this.style = style;
2936
}
3037
}
3138

@@ -35,19 +42,22 @@ export class UrlButton {
3542
imageUrl?: string;
3643
target?: string;
3744
windowFeatures?: string;
45+
style?: string;
3846

3947
constructor(
40-
label: string,
41-
url: string,
42-
imageUrl?: string,
43-
target?: string,
44-
windowFeatures?: string,
48+
label: string,
49+
url: string,
50+
imageUrl?: string,
51+
target?: string,
52+
windowFeatures?: string,
53+
style?: string,
4554
) {
4655
this.label = label;
4756
this.url = url;
4857
this.imageUrl = imageUrl;
4958
this.target = target;
5059
this.windowFeatures = windowFeatures;
60+
this.style = style;
5161
}
5262
}
5363

src/model/responses.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ interface BotConnectorUrlButton {
5757
imageUrl?: string;
5858
target?: string;
5959
windowFeatures?: string;
60+
style?: string;
6061
}
6162

6263
interface BotConnectorPostbackButton {

src/useTock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function mapButton(button: BotConnectorButton): Button {
9393
button.imageUrl,
9494
button.target,
9595
button.windowFeatures,
96+
button.style,
9697
);
9798
}
9899
}

0 commit comments

Comments
 (0)