version 2
This commit is contained in:
parent
edf15f1fa3
commit
48ae3322d1
File diff suppressed because one or more lines are too long
|
|
@ -569,7 +569,7 @@ export class ContentService {
|
||||||
|
|
||||||
for (const chat of data) {
|
for (const chat of data) {
|
||||||
this._clickToConversation(chat.id as string);
|
this._clickToConversation(chat.id as string);
|
||||||
await delay(1000);
|
await delay(2000);
|
||||||
|
|
||||||
const currentRoom = this.service.getCurrentRoomInfo();
|
const currentRoom = this.service.getCurrentRoomInfo();
|
||||||
|
|
||||||
|
|
@ -585,7 +585,7 @@ export class ContentService {
|
||||||
console.error("❌ autoSyncConversationPrefixMessages error:", err);
|
console.error("❌ autoSyncConversationPrefixMessages error:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 20000);
|
}, 30000);
|
||||||
|
|
||||||
console.log("✅ autoSyncConversationPrefixMessages running with PQueue");
|
console.log("✅ autoSyncConversationPrefixMessages running with PQueue");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import { SendMessageDto } from './dtos/send-message.dto';
|
||||||
import { MessagesEventService } from './messages-event.service';
|
import { MessagesEventService } from './messages-event.service';
|
||||||
import { ZulipService } from './zulip.service';
|
import { ZulipService } from './zulip.service';
|
||||||
import { CreateBulkMessageDto } from './dtos/create-bulk-message.dto';
|
import { CreateBulkMessageDto } from './dtos/create-bulk-message.dto';
|
||||||
|
import { delay } from '@/features/delay';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MessagesService {
|
export class MessagesService {
|
||||||
constructor(
|
constructor(
|
||||||
|
|
@ -82,7 +83,9 @@ export class MessagesService {
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (
|
if (
|
||||||
!conversation.name.includes(process.env.GROUP_PREFIX) ||
|
!conversation.name
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
.includes(process.env.GROUP_PREFIX.toLocaleLowerCase()) ||
|
||||||
conversation.type !== 'group'
|
conversation.type !== 'group'
|
||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
@ -215,6 +218,8 @@ ${result.message}
|
||||||
|
|
||||||
const result = await this.create(mes);
|
const result = await this.create(mes);
|
||||||
|
|
||||||
|
await delay(200);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
results.push(result);
|
results.push(result);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue