( target: TargetChat, userId: string, patch: Partial<AvgCacheEntry>, )
| 446 | ...patch, |
| 447 | updatedAt: Date.now(), |
| 448 | }; |
| 449 | await db.write(); |
| 450 | } |
| 451 | |
| 452 | async function setCachedAvgEntry( |
| 453 | target: TargetChat, |
| 454 | userId: string, |
| 455 | avgPerDay: number, |
| 456 | ): Promise<void> { |
| 457 | await setCachedEntry(target, userId, { |
| 458 | avgPerDay, |
| 459 | }); |
| 460 | } |
| 461 | |
| 462 | async function setCachedUserInfo( |
| 463 | target: TargetChat, |
| 464 | user: Api.User, |
| 465 | ): Promise<void> { |
no test coverage detected