Skip to content

Commit

Permalink
Revert "Include stream from when possible"
Browse files Browse the repository at this point in the history
This reverts commit 4c3a481.
  • Loading branch information
sonnyp committed Dec 22, 2024
1 parent d0c8030 commit eb52715
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
9 changes: 0 additions & 9 deletions packages/connection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,6 @@ class Connection extends EventEmitter {

const headerElement = this.headerElement();
headerElement.attrs.to = domain;
if (
this.socket.secure &&
this.socket.secure() &&
(this.streamFrom || this.jid)
) {
// When the stream is secure there is no leak to setting the stream from
// This is recommended in general and required for FAST implementations
headerElement.attrs.from = (this.streamFrom || this.jid).toString();
}
headerElement.attrs["xml:lang"] = lang;
this.root = headerElement;

Expand Down
4 changes: 0 additions & 4 deletions packages/tls/lib/Socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class Socket extends EventEmitter {
this.timeout = null;
}

secure() {
return true;
}

connect(...args) {
this._attachSocket(tls.connect(...args));
}
Expand Down
4 changes: 0 additions & 4 deletions packages/websocket/lib/Socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ export default class Socket extends EventEmitter {
this.listeners = Object.create(null);
}

secure() {
return this.url.startsWith("wss") || this.url.startsWith("ws://localhost");
}

connect(url) {
this.url = url;
this._attachSocket(new WebSocket(url, ["xmpp"]));
Expand Down

0 comments on commit eb52715

Please sign in to comment.