The notification dropdown wasn't fetching events if rootPath used (#3299)

This commit is contained in:
Nicolas Dorier 2022-01-13 17:08:33 +09:00 committed by GitHub
parent 69d1acc797
commit 5ad6d77973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,8 +81,9 @@
<script>
if ('WebSocket' in window && window.WebSocket.CLOSING === 2) {
const { host, protocol } = window.location;
const wsUri = `${protocol === "https:" ? "wss:" : "ws:"}//${host}@_linkGenerator.GetPathByAction("SubscribeUpdates", "Notifications")`;
const newDataEndpoint = "@_linkGenerator.GetPathByAction("GetNotificationDropdownUI", "Notifications")";
var wsUri = "@_linkGenerator.GetPathByAction("SubscribeUpdates", "Notifications", pathBase: this.Context.Request.PathBase)";
wsUri = (protocol === "https:" ? "wss:" : "ws:") + "//" + host + wsUri;
const newDataEndpoint = "@_linkGenerator.GetPathByAction("GetNotificationDropdownUI", "Notifications", pathBase: this.Context.Request.PathBase)";
try {
socket = new WebSocket(wsUri);
socket.onmessage = e => {