Versions in this module Expand all Collapse all v1 v1.6.1 Mar 27, 2025 v1.6.0 Mar 27, 2025 Changes in this version + const NotificationTypeCreateGroup + const NotificationTypePromotedToSpeaker + const NotificationTypeReceivedTip + const NotificationTypeSendListenerMessage + const NotificationTypeSendTip + const NotificationTypeUnknown + const NotificationTypeWeeklyBonus + const NotificationTypeWelcomeBonus + var ErrInvalidActivityFeedType = errors.New("activity feed type not supported") + var ErrInvalidNotificationType = errors.New("notification type not supported") + func GetNotificationID(notificationType NotificationType, userID *commonpb.UserId, ...) (*activitypb.NotificationId, error) + func InjectLocalizedText(ctx context.Context, notification *activitypb.Notification) error + func NotificationIDString(id *activitypb.NotificationId) string + func SendNotification(ctx context.Context, activityFeeds Store, ...) (*activitypb.Notification, error) + type NotificationBuilder func() (*activitypb.Notification, error) + func NewCreateGroupNotificationBuilder(ctx context.Context, userID *commonpb.UserId, chatID *commonpb.ChatId, ...) NotificationBuilder + func NewPromotedToSpeakerNotificationBuilder(ctx context.Context, promotee, promoter *commonpb.UserId, ...) NotificationBuilder + func NewReceivedTipNotificationBuilder(ctx context.Context, userID *commonpb.UserId, chatID *commonpb.ChatId, ...) NotificationBuilder + func NewSendListenerMessageNotificationBuilder(ctx context.Context, userID *commonpb.UserId, chatID *commonpb.ChatId, ...) NotificationBuilder + func NewSendTipNotificationBuilder(ctx context.Context, userID *commonpb.UserId, chatID *commonpb.ChatId, ...) NotificationBuilder + func NewWeeklyBonusNotificationBuilder(ctx context.Context, userID *commonpb.UserId, quarks uint64, ts time.Time) NotificationBuilder + func NewWelcomeBonusNotificationBuilder(ctx context.Context, userID *commonpb.UserId, quarks uint64, ts time.Time) NotificationBuilder + type NotificationType uint32 + type Server struct + func NewServer(log *zap.Logger, authz auth.Authorizer, activityFeeds Store) *Server + func (s *Server) GetLatestNotifications(ctx context.Context, req *activitypb.GetLatestNotificationsRequest) (*activitypb.GetLatestNotificationsResponse, error) + type Store interface + GetLatestNotifications func(ctx context.Context, activityFeedType activitypb.ActivityFeedType, ...) ([]*activitypb.Notification, error) + SaveNotification func(ctx context.Context, activityFeedType activitypb.ActivityFeedType, ...) (*activitypb.Notification, error)