Skip to content

Commit 6a93247

Browse files
committed
fix: Automatically activate or pause accounts based on agent status
1 parent 484ed59 commit 6a93247

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/client-direct/src/manage-api.ts

+3
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ export function createManageApiRouter(
162162
if(!agent && item.status === AccountStatus.ACTIVE) {
163163
item.status = AccountStatus.PAUSED;
164164
await changeAccountStatus(item.id, AccountStatus.PAUSED);
165+
} else if(agent && item.status !== AccountStatus.ACTIVE) {
166+
item.status = AccountStatus.ACTIVE;
167+
await changeAccountStatus(item.id, AccountStatus.ACTIVE);
165168
}
166169
}
167170
}

0 commit comments

Comments
 (0)