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 with stage
in 2 minutes and 26 seconds
......@@ -84,10 +84,13 @@ export class AgentConnectionsService {
};
deleteConnectionById = async (id: string): Promise<void> => {
await this.askar.agent.connections.hangup({
connectionId: id,
deleteAfterHangup: true,
});
const connection = await this.askar.agent.connections.getById(id);
if (connection.theirDid) {
await this.askar.agent.connections.hangup({
connectionId: id,
});
}
await this.askar.agent.connections.deleteById(id);
};
trustPingToConnection = async (connectionId: string) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment