예제 #1
0
        protected override void SendNotifications()
        {
            var notification = CreateNotification();

            if (notification.subject_id == notification.user_id)
            {
                Logger.Instance.Debug($"user:{userId} will not be notified on his own actions");
                return;
            }
            //Logger.Instance.Debug($"sending notification:{JsonConvert.SerializeObject(notification)}");
            ActivityNotifications.Add(notification);
        }
예제 #2
0
        protected virtual void SendNotifications()
        {
            return; //currently do nothing because notifications are made outside

            var notification = CreateNotification();

            if (notification.subject_id == notification.user_id)
            {
                Logger.Instance.Debug($"user:{userId} will not be notified on his own actions");
                return;
            }
            //Logger.Instance.Debug($"sending notification:{JsonConvert.SerializeObject(notification)}");
            ActivityNotifications.Add(notification);
        }
예제 #3
0
        protected override void SendNotifications()
        {
            base.SendNotifications();
            //also send notifications for tagges users
            var composer = reqParams.GetComposer();

            if (composer != null)
            {
                foreach (var taggedUser in composer.GetTaggedUsers())
                {
                    Logger.Instance.Debug($"sending notification to tagged user {taggedUser}");
                    var tagNotification = CreateNotification();
                    tagNotification.user_id    = (uint)taggedUser;
                    tagNotification.type       = "tagged";
                    tagNotification.subject_id = userId;
                    tagNotification.@params    = "{\"object_type_name\":\"activity_comment\",\"label\":\"comment\"}";
                    ActivityNotifications.Add(tagNotification);
                }
            }
        }