2
0
Эх сурвалжийг харах

No need to call `validate` here

Since the plugin is not enabled when it matters.

updates #1374
JC Brand 6 жил өмнө
parent
commit
c954610903

+ 0 - 7
src/converse-controlbox.js

@@ -145,13 +145,6 @@ converse.plugins.add('converse-controlbox', {
         },
         },
 
 
         ChatBox: {
         ChatBox: {
-            validate (attrs, options) {
-                const { _converse } = this.__super__;
-                if (_converse.view_mode === 'embedded' && attrs.type === _converse.CONTROLBOX_TYPE) {
-                    return 'Controlbox not relevant in embedded view mode';
-                }
-            },
-
             initialize () {
             initialize () {
                 if (this.get('id') === 'controlbox') {
                 if (this.get('id') === 'controlbox') {
                     this.set({'time_opened': moment(0).valueOf()});
                     this.set({'time_opened': moment(0).valueOf()});