File tree 8 files changed +25
-15
lines changed
8 files changed +25
-15
lines changed Original file line number Diff line number Diff line change 28
28
- name : Set up Docker Buildx
29
29
uses : docker/setup-buildx-action@v1
30
30
- name : Cache Docker layers
31
- uses : actions/cache@v2
31
+ uses : actions/cache@v4
32
32
with :
33
33
path : /tmp/.buildx-cache
34
34
key : ${{ runner.os }}-buildx-${{ github.sha }}
59
59
steps :
60
60
- name : Checkout code
61
61
uses : actions/checkout@master
62
- - uses : actions/setup-node@v2
62
+ - uses : actions/setup-node@v3
63
63
with :
64
64
node-version-file : ' .nvmrc'
65
65
cache : ' yarn'
Original file line number Diff line number Diff line change @@ -164,25 +164,30 @@ jobs:
164
164
runs-on : ubuntu-latest
165
165
strategy :
166
166
matrix :
167
- browser : ['chrome', 'firefox' ]
167
+ browser : ['chrome']
168
168
169
169
steps :
170
170
- name : Checkout code
171
171
uses : actions/checkout@master
172
- - uses : actions/setup-node@v2
172
+ - uses : actions/setup-node@v3
173
173
with :
174
174
node-version-file : ' .nvmrc'
175
175
cache : ' yarn'
176
+
177
+ - name : Install Firefox
178
+ run : sudo apt-get install -y firefox
179
+
180
+ - name : Upgrade Cypress
181
+ run : yarn add cypress@latest --dev
182
+
176
183
- name : Fetch Node Packages
177
184
run : |
178
185
yarn --immutable
179
186
yarn build
180
187
181
188
- name : Run e2e tests
182
- run : |
183
- yarn test:chat:${{ matrix.browser }}
189
+ run : xvfb-run --auto-servernum yarn test:chat:${{ matrix.browser }}
184
190
185
191
- name : Run unit tests
186
192
working-directory : ./packages/inject
187
- run : |
188
- yarn test
193
+ run : yarn test
Original file line number Diff line number Diff line change 1
- 16
1
+ v16.14.0
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @botpress/messaging" ,
3
- "version" : " 1.2.17 " ,
3
+ "version" : " 1.2.18 " ,
4
4
"description" : " Botpress messaging repo" ,
5
5
"author" : " Botpress, Inc." ,
6
6
"license" : " AGPL-3.0" ,
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export interface CardContent extends Content {
48
48
subtitle ?: string
49
49
image ?: string
50
50
actions : ActionButton [ ]
51
+ markdown ?: boolean
51
52
}
52
53
53
54
export interface LocationContent extends Content {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class TelegramCarouselRenderer extends CarouselRenderer {
30
30
}
31
31
32
32
endRenderCard ( context : Context , card : CardContent ) {
33
- const text = `* ${ card . title } * ${ card . subtitle ? '\n' + card . subtitle : '' } `
33
+ const text = `${ card . title } ${ card . subtitle ? '\n' + card . subtitle : '' } `
34
34
35
35
if ( card . image ) {
36
36
context . channel . messages . push ( { action : 'upload_photo' } )
@@ -39,12 +39,16 @@ export class TelegramCarouselRenderer extends CarouselRenderer {
39
39
url : card . image ,
40
40
filename : path . basename ( card . image )
41
41
} ,
42
- extra : { caption : text , parse_mode : 'Markdown' , ...Markup . inlineKeyboard ( context . buttons ) }
42
+ extra : {
43
+ caption : text ,
44
+ ...( card . markdown && { parse_mode : 'Markdown' } ) ,
45
+ ...Markup . inlineKeyboard ( context . buttons )
46
+ }
43
47
} )
44
48
} else {
45
49
context . channel . messages . push ( {
46
50
text,
47
- extra : Markup . inlineKeyboard ( context . buttons )
51
+ extra : { ... ( card . markdown && { parse_mode : 'Markdown' } ) , ... Markup . inlineKeyboard ( context . buttons ) }
48
52
} )
49
53
}
50
54
}
Original file line number Diff line number Diff line change @@ -10,6 +10,6 @@ export class TelegramChoicesRenderer extends ChoicesRenderer {
10
10
}
11
11
12
12
const buttons = payload . choices . map ( ( x ) => Markup . button . callback ( x . title , x . value ) )
13
- context . messages [ 0 ] . extra = Markup . keyboard ( buttons ) . oneTime ( )
13
+ context . messages [ 0 ] . extra = { ... context . messages [ 0 ] . extra , ... Markup . keyboard ( buttons ) . oneTime ( ) }
14
14
}
15
15
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @botpress/messaging-server" ,
3
- "version" : " 1.2.17 " ,
3
+ "version" : " 1.2.18 " ,
4
4
"main" : " index.ts" ,
5
5
"license" : " AGPL-3.0" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments