wuyi 2 роки тому
батько
коміт
3110cfcc99
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      src/moments/moments.service.ts

+ 3 - 0
src/moments/moments.service.ts

@@ -165,6 +165,9 @@ export class MomentsService {
             setTimeout(async () => {
                 moments.isDel = false
                 await this.momentsRepository.save(moments)
+                const chatRole = await this.chatRoleRepository.findOneBy({ id: moments.userId })
+                chatRole.dynamicNumber += 1
+                await this.chatRoleRepository.save(chatRole)
             }, hours * 60 * 60 * 1000 + minutes * 60 * 1000)
         })
     }