Răsfoiți Sursa

Update http-auth plugin to Converse V 9.0.0

jnanar 3 ani în urmă
părinte
comite
b9e2bd91e5
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      packages/http-auth/http-auth.js

+ 3 - 1
packages/http-auth/http-auth.js

@@ -38,6 +38,7 @@ const plugin = {
         html = converse.env.html;
         Model = converse.env.Model;
         const httpAuthDialog = BootstrapModal.extend({
+            id: "plugin-http-auth",
             events: {
                 'click .btn-acceptAuth': 'acceptAuth',
                 'click .btn-refuseAuth': 'refuseAuth',
@@ -119,6 +120,7 @@ const plugin = {
                         httpAuthMessage = converse.env.$msg({
                             from: _converse.jid,
                             to: stanza.getAttribute('from'),
+                            type: "normal",
                         });
                         const thread = stanza.getElementsByTagName('thread')[0].textContent;
                         httpAuthMessage.c('thread').t(thread).up();
@@ -130,7 +132,7 @@ const plugin = {
                             id: stanza.getAttribute('id'),
                             type: 'error',
                         });
-                        httpAuthData.response = httpAuthMessage;
+                        httpAuthData['response'] = httpAuthMessage;
                     }
 
                     const confirmDialog = new httpAuthDialog({ 'model': new Model({ view: _converse.rosterview, data: httpAuthData }) });