feat: send email notifications for missed messages
- New cron job in cluster - Handle presence and other concerns - Toggle in app to disable email notifications - Handles other edge cases such as cooldown period - Simple html email with simple message Closes #117
This commit is contained in:
@@ -72,7 +72,22 @@ func (s *Server) HandleWebSocket(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// BulkGetPresence implements the gRPC PusherService.
|
||||
// When channel_ids is empty, returns all connected humanIDs across all channels
|
||||
// under the key "_all" — useful for checking overall online status.
|
||||
func (s *Server) BulkGetPresence(ctx context.Context, req *pbpusher.BulkGetPresenceRequest) (*pbpusher.BulkGetPresenceResponse, error) {
|
||||
// Empty channel_ids → return all connected humans
|
||||
if len(req.ChannelIds) == 0 {
|
||||
humanIDs, err := s.bridge.GetAllConnectedHumanIDs(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &pbpusher.BulkGetPresenceResponse{
|
||||
Presences: map[string]*pbpusher.ChannelPresence{
|
||||
"_all": {HumanIds: humanIDs},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
presence, err := s.bridge.GetPresence(ctx, req.ChannelIds)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user