ソースを参照

Fixes #3386 Registration form is not fetched

JC Brand 5 ヶ月 前
コミット
d103355cf4
2 ファイル変更5 行追加1 行削除
  1. 1 0
      CHANGES.md
  2. 4 1
      src/plugins/register/panel.js

+ 1 - 0
CHANGES.md

@@ -31,6 +31,7 @@
 - #3307: Fix inconsistency between browsers on textarea outlines
 - #3337: Correctly display multiline nested quotes
 - #3362: Don't create empty nick element in bookmarks
+- #3386: Registration form is not fetched
 - #3476: better UI for form "fixed" fields
 - #3478: MUC participant status indicator misplaced 
 - #3529: Unbookmarked channels no longer change their name when clicked with an unread indicator (or text icon)

+ 4 - 1
src/plugins/register/panel.js

@@ -94,8 +94,11 @@ class RegisterPanel extends CustomElement {
         const conn = api.connection.get();
         conn.connected = true;
 
-        const body = conn._proto._reqToData(req);
+        const body = /** @type {Element} */ (
+            '_reqToData' in conn._proto ? conn._proto._reqToData(/** @type {Request} */ (req)) : req
+        );
         if (!body) { return; }
+
         if (conn._proto._connect_cb(body) === Strophe.Status.CONNFAIL) {
             this.status = CHOOSE_PROVIDER;
             this.setErrorMessage(__("Sorry, we're unable to connect to your chosen provider."));