From e9f6543d2ee07b23931835098e42130a4a2331d6 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Sat, 18 Nov 2017 22:23:43 +0000 Subject: [PATCH] prefix etherpad name with roomID --- .../widget/etherpad/etherpad-config.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web/app/configs/widget/etherpad/etherpad-config.component.ts b/web/app/configs/widget/etherpad/etherpad-config.component.ts index 8ecfd6b..6b46bff 100644 --- a/web/app/configs/widget/etherpad/etherpad-config.component.ts +++ b/web/app/configs/widget/etherpad/etherpad-config.component.ts @@ -38,18 +38,18 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo getPadURL(widget?: Widget): string { if (widget) { if (this.editUseCustomServer) { - const url = widget.data.newPadServer + widget.data.newPadName; + const url = widget.data.newPadServer + this.roomId + "_" + widget.data.newPadName; return url; } else { - const url = "https://demo.riot.im/etherpad/p/" + widget.data.newPadName; + const url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + widget.data.newPadName; return url; } } else { if (this.useCustomServer) { - const url = this.newEtherpadServerUrl + this.newWidgetUrl; + const url = this.newEtherpadServerUrl + this.roomId + "_" + this.newWidgetUrl; return url; } else { - const url = "https://demo.riot.im/etherpad/p/" + this.newWidgetUrl; + const url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + this.newWidgetUrl; return url; } } @@ -83,7 +83,7 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo return; } - const originalUrl = this.newWidgetUrl; + const originalUrl = this.roomId + "_" + this.newWidgetUrl; this.newWidgetUrl = url; if (this.useCustomServer) { @@ -105,6 +105,7 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo widget.newUrl = url; widget.data.padName = widget.data.newPadName; + widget.data.padSuffix = this.roomId + "_" + widget.data.newPadName; if (this.editUseCustomServer) { widget.data.padServer = widget.data.newPadServer; } else {