Skip to content

Commit

Permalink
chore: Cleanup and add botman/web-widget#39 solution
Browse files Browse the repository at this point in the history
  • Loading branch information
EranGrin committed Apr 30, 2024
1 parent 005dba5 commit 5a5a002
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>
<p align="center">
<img src="https://img.shields.io/badge/license-MIT-green" alt="License MIT">
<img src="https://img.shields.io/badge/version-1.2.5-blue" alt="version 1.2.5">
<img src="https://img.shields.io/badge/version-1.2.6-blue" alt="version 1.2.6">
<img src="https://img.shields.io/badge/maintained-yes-brightgreen" alt="maintained yes">
</p>

Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/EranGrin/botman-extended-web-widget"
},
"version": "1.2.5",
"version": "1.2.6",
"description": "A BotMan frontend package for the web widget",
"type": "module",
"main": "dist/widget.js",
Expand Down Expand Up @@ -46,5 +46,9 @@
"@types/node": "^20.12.4",
"typescript": "^5.2.2",
"vite": "^5.2.0"
},
"volta": {
"node": "18.13.0",
"yarn": "1.22.19"
}
}
1 change: 0 additions & 1 deletion src/chat/messages/action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { IMessageTypeProps, IAction, IMessage } from '../../typings';
export default class Action extends MessageType {

render(props: IMessageTypeProps) {
console.log('props', props);
const { message } = props;

const buttons = message.actions?.map((action: IAction) => {
Expand Down
1 change: 1 addition & 0 deletions src/widget/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export default class Widget extends Component<any, IWidgetState> {
data.append('driver', 'web');
data.append('eventName', 'widgetOpened');
data.append('eventData', this.props.conf.widgetOpenedEventData);
data.append('userId', window?.botmanWidget?.userId || this.props.conf.userId);

axios.post(this.props.conf.chatServer, data).then(response => {
const messages = response.data.messages || [];
Expand Down

0 comments on commit 5a5a002

Please sign in to comment.