udate
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user