feat(call): enhance call service with reliable message delivery and automatic cleanup
All checks were successful
Build Backend / build (push) Successful in 18m14s
Build Backend / build-docker (push) Successful in 2m29s

- Introduced a new method, PublishToUserOnlineReliable, to ensure critical signaling messages are reliably sent to online users.
- Updated CallService to include a cleanup mechanism for expired calls, improving resource management and user experience.
- Enhanced call acceptance logic to utilize optimistic locking for state updates, ensuring accurate call status handling across devices.
- Refactored wire generation to accommodate the new database dependency in CallService, streamlining service initialization.
This commit is contained in:
lafay
2026-03-28 00:20:56 +08:00
parent 20b1e04764
commit bac3cbbf60
4 changed files with 125 additions and 20 deletions

View File

@@ -387,6 +387,7 @@ func ProvideCallService(
callRepo repository.CallRepository,
wsHub *ws.Hub,
cfg *config.Config,
db *gorm.DB,
) service.CallService {
return service.NewCallService(callRepo, wsHub, cfg)
return service.NewCallService(callRepo, wsHub, cfg, db)
}