Skip to content
Snippets Groups Projects
Commit 40dc900e authored by Alexey Lunin's avatar Alexey Lunin
Browse files

fix: fix delete connection by id when theirDid is empty OP#443

parent 40fafd19
No related branches found
No related tags found
1 merge request!85fix: fix delete connection by id when theirDid is empty OP#443
Pipeline #71170 passed
...@@ -84,10 +84,13 @@ export class AgentConnectionsService { ...@@ -84,10 +84,13 @@ export class AgentConnectionsService {
}; };
deleteConnectionById = async (id: string): Promise<void> => { deleteConnectionById = async (id: string): Promise<void> => {
await this.askar.agent.connections.hangup({ const connection = await this.askar.agent.connections.getById(id);
connectionId: id, if (connection.theirDid) {
deleteAfterHangup: true, await this.askar.agent.connections.hangup({
}); connectionId: id,
});
}
await this.askar.agent.connections.deleteById(id);
}; };
trustPingToConnection = async (connectionId: string) => { trustPingToConnection = async (connectionId: string) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment