mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Send chat disconnected message when tech closes the window (was missing).
This commit is contained in:
parent
067cc0a876
commit
933c0afbfa
@ -85,6 +85,7 @@ public partial class ChatCard : AuthComponentBase, IAsyncDisposable
|
||||
|
||||
private async Task CloseChatCard()
|
||||
{
|
||||
await CircuitConnection.SendChat(string.Empty, $"{Session.DeviceId}", true);
|
||||
_ = ChatSessionStore.TryRemove($"{Session.DeviceId}", out _);
|
||||
var message = new ChatSessionsChangedMessage();
|
||||
await Messenger.Send(message, CircuitConnection.ConnectionId);
|
||||
|
||||
@ -45,7 +45,7 @@ public interface ICircuitConnection
|
||||
|
||||
Task RunScript(IEnumerable<string> deviceIds, Guid savedScriptId, int scriptRunId, ScriptInputType scriptInputType, bool runAsHostedService);
|
||||
|
||||
Task SendChat(string message, string deviceId);
|
||||
Task SendChat(string message, string deviceId, bool isDisconnecting = false);
|
||||
Task<bool> TransferFileFromBrowserToAgent(string deviceId, string transferId, string[] fileIds);
|
||||
|
||||
Task TriggerHeartbeat(string deviceId);
|
||||
@ -360,7 +360,7 @@ public class CircuitConnection : CircuitHandler, ICircuitConnection
|
||||
|
||||
}
|
||||
|
||||
public async Task SendChat(string message, string deviceId)
|
||||
public async Task SendChat(string message, string deviceId, bool isDisconnecting = false)
|
||||
{
|
||||
if (!_dataService.DoesUserHaveAccessToDevice(deviceId, User))
|
||||
{
|
||||
@ -392,7 +392,7 @@ public class CircuitConnection : CircuitHandler, ICircuitConnection
|
||||
message,
|
||||
orgResult.Value,
|
||||
User.OrganizationID,
|
||||
false,
|
||||
isDisconnecting,
|
||||
ConnectionId);
|
||||
}
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit b306cc12afcc8c7d758a92682d3a06d2519b9735
|
||||
Subproject commit 9abf3d89436f17938f5d5029bf0016a050c4a4fe
|
||||
Loading…
Reference in New Issue
Block a user