feat: add stickers

This commit is contained in:
Krispire Admin
2026-08-30 02:18:53 +05:30
parent cee2d3c874
commit fecb9bc045
15 changed files with 752 additions and 6 deletions
+22
View File
@@ -398,6 +398,28 @@ func (s *SadhnaService) Rewards(ctx context.Context, userID string) ([]model.Sad
// AckRewards clears the user's pending celebration(s) after the client has
// shown the confetti.
// OpenGift un-blurs one gift after the devotee has seen its celebration.
//
// Per gift, not per user: someone with two waiting should open them one at a
// time rather than have the first dismissal clear both.
func (s *SadhnaService) OpenGift(ctx context.Context, userID, rewardKey string) error {
return s.rewards.OpenGift(ctx, userID, rewardKey)
}
// GiftToEveryone hands a reward to every account. Returns how many it reached.
func (s *SadhnaService) GiftToEveryone(ctx context.Context, rewardKey string) (int64, error) {
reward, err := s.rewards.ByKey(ctx, rewardKey)
if err != nil {
return 0, err
}
return s.rewards.GrantGiftToEveryone(ctx, reward.ID)
}
// GiftableRewards is the catalog an admin picks from.
func (s *SadhnaService) GiftableRewards(ctx context.Context) ([]model.SadhnaReward, error) {
return s.rewards.ListGiftable(ctx)
}
func (s *SadhnaService) AckRewards(ctx context.Context, userID string) error {
return s.rewards.MarkCelebrated(ctx, userID)
}