This commit is contained in:
NAME
2026-05-12 03:43:19 +00:00
parent 34a678b3c3
commit d9766dc7f0
3 changed files with 39 additions and 9 deletions
+6 -3
View File
@@ -21,7 +21,7 @@ export enum XStrategy {
BROWSER_ONLY = 'browser_only',
AUTO = 'auto', // dựa vào health account
BROWSER_API = 'browser_api',
BROWSER_COOKIE = 'browser_cookie'// khi cần chống bot nặng
BROWSER_COOKIE = 'browser_cookie'
}
export interface UnifiedAccount {
@@ -196,7 +196,10 @@ export class XPosterRouterService {
tweetUrl: params.tweetUrl,
tweetId: params.tweetId,
});
attempts.push({method, error: result.error});
attempts.push({
method,
error: method + ':' + result.error
});
if (result.success) {
return {
@@ -260,7 +263,7 @@ export class XPosterRouterService {
text: string,
): Promise<{ success: boolean; tweetId?: string; error?: string }> {
try {
if (method === 'api' && account.api) {
if (method === 'api' && account.api && account.api?.appKey) {
const {data: r} = await this.apiSvc.postSimpleTweet(text);
return {
tweetId: r.id,