Skip to content

Commit

Permalink
Add XMMP server domain as argument of init()
Browse files Browse the repository at this point in the history
  • Loading branch information
gibus committed Oct 16, 2016
1 parent 347857b commit 9759527
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions register/README.md
Expand Up @@ -12,12 +12,12 @@ To enable *Register* you have to include the Strophe registration plugin `stroph
<script type="text/javascript" src="candyshop/register/register.js"></script>
```

Call its `init()` method after Candy has been initialized, then just call its `showRegistrationForm()` method, where you would have called `Candy.Core.Connect() method to display usual Candy connection modal form:
Call its `init()` method after Candy has been initialized, passing the XMMP server domain as parameter. Then just call its `showRegistrationForm()` method, where you would have called `Candy.Core.Connect() method to display usual Candy connection modal form:

```JavaScript
Candy.init('/http-bind/', {core: {autojoin: []}});
// enable Register plugin
CandyShop.Register.init();
CandyShop.Register.init({domain: 'my_jabber_domain.org'});

CandyShop.Register.showRegistrationForm();
```
Expand Down
2 changes: 1 addition & 1 deletion register/register.js
Expand Up @@ -119,7 +119,7 @@ CandyShop.Register = (function(self, Candy, $) {
};

// Connect with Stophe.register plugin
connection.register.connect("pirenaica.fr", callback, 60, 1);
connection.register.connect(self._options.domain, callback, 60, 1);
});
}

Expand Down

0 comments on commit 9759527

Please sign in to comment.