|
|
@@ -47,6 +47,7 @@ export class MomentsService {
|
|
|
this.delay()
|
|
|
}, 3 * 60 * 1000)
|
|
|
}, 24 * 60 * 60 * 1000)
|
|
|
+ //24 * 60
|
|
|
}, delayTime)
|
|
|
}
|
|
|
|
|
|
@@ -146,11 +147,13 @@ export class MomentsService {
|
|
|
|
|
|
chatRoleList.forEach(async role => {
|
|
|
const text = await this.chatService.sendMessage(null, role.condition)
|
|
|
- const momentsDto = new MomentsDto
|
|
|
- momentsDto.content = text
|
|
|
- momentsDto.userId = role.id
|
|
|
- momentsDto.isPush = false
|
|
|
- await this.momentsRepository.save(momentsDto)
|
|
|
+ if (text.trim() !== '') {
|
|
|
+ const momentsDto = new MomentsDto
|
|
|
+ momentsDto.content = text
|
|
|
+ momentsDto.userId = role.id
|
|
|
+ momentsDto.isPush = false
|
|
|
+ await this.momentsRepository.save(momentsDto)
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|