fix: add whitespace trimming in matrix homeserverurl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/7196/head
philippderdiedas 4 weeks ago committed by GitHub
parent 0a5e967b05
commit 468250a8c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -18,8 +18,8 @@ class Matrix extends NotificationProvider {
log.debug("notification", "Random String: " + randomString);
const roomId = encodeURIComponent(notification.internalRoomId);
// strip trailing /
const baseUrl = notification.homeserverUrl.replace(/\/+$/, "");
// normalize URL: trim whitespace and strip trailing /
const baseUrl = notification.homeserverUrl.trim().replace(/\/+$/, "");
log.debug("notification", "Matrix Room ID: " + roomId);

Loading…
Cancel
Save