Make tracker configurable, fixes #171

This commit is contained in:
Håvar Aambø Fosstveit
2020-04-03 18:12:31 +02:00
parent 10886e3dc6
commit e1bb07bc4e
3 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -160,6 +160,8 @@ export default class RoomClient
if (displayName)
store.dispatch(settingsActions.setDisplayName(displayName));
this._tracker = 'wss://tracker.lab.vvc.niif.hu:443';
// Torrent support
this._torrentSupport = null;
@@ -781,7 +783,7 @@ export default class RoomClient
this._webTorrent.seed(
files,
{ announceList: [ [ 'wss://tracker.lab.vvc.niif.hu:443' ] ] },
{ announceList: [ [ this._tracker ] ] },
(newTorrent) =>
{
store.dispatch(requestActions.notify(
@@ -2526,6 +2528,7 @@ export default class RoomClient
authenticated,
roles,
peers,
tracker,
permissionsFromRoles,
userRoles
} = await this.sendRequest(
@@ -2543,6 +2546,8 @@ export default class RoomClient
roles
);
tracker && (this._tracker = tracker);
store.dispatch(meActions.loggedIn(authenticated));
store.dispatch(roomActions.setUserRoles(userRoles));