-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FederationServer #49
FederationServer #49
Conversation
For loading
parse it and then create and return |
} | ||
address = `${address}*${this.domain}`; | ||
} | ||
let url = this.serverURL.query(`type=name&q=${address}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like using the map form of query
would be better:
this.serverURL.query({type: "name", q: address});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://medialize.github.io/URI.js/docs.html#accessors-search has all the different forms available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thanks. I haven't noticed it.
+1 |
* @returns {Promise} | ||
*/ | ||
static forAddress(address) { | ||
let [,domain] = address.split('*'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will behave incorrectly in the presence of 2 asterisks. We should ensure there isn't, returning an error to the user if there is.
Other than the bug I pointed out, +1 |
Changes to number arguments
This PR introduces
FederationServer
class that allows sending requests to federation servers.Close #47