Compare commits

...

2 Commits

2 changed files with 22 additions and 0 deletions

11
components/ui/index.js Normal file
View File

@ -0,0 +1,11 @@
export { Badge } from './badge';
export { Button } from './button';
export { Card } from './card';
export { Checkbox } from './checkbox';
export { Input } from './input';
export { Label } from './label';
export { RadioGroup } from './radio-group';
export { Select } from './select';
export { Skeleton } from './skeleton';
export { Switch } from './switch';
export { Textarea } from './textarea';

View File

@ -787,6 +787,17 @@ export default class MessageBus {
EventBus.getInstance().emit('PAIRING_CREATED', correlationId, message.decodedData);
break;
case 'CONVERSATION_CREATED':
if (this.errors[correlationId]) {
const error = this.errors[correlationId];
delete this.errors[correlationId];
EventBus.getInstance().emit('ERROR_CONVERSATION_CREATED', correlationId, error);
return;
}
EventBus.getInstance().emit('MESSAGE_RECEIVED', message);
EventBus.getInstance().emit('CONVERSATION_CREATED', correlationId, message.decodedData);
break;
case 'ERROR':
console.error('Error:', message);
this.errors[correlationId] = message.error;