Exemplo n.º 1
0
        public void AddNotification(String lnkTarget)
        {
            ContentPost post = ContentPost.findById(this.RootId);

            if (post == null)
            {
                return;
            }

            int receiverId = post.OwnerId;

            // 自己的回复不用给自己发通知
            if (this.Member != null && (this.Member.Id == receiverId))
            {
                return;
            }

            String msg = this.Author + " 评论了文章 <a href=\"" + lnkTarget + "\">" + post.Title + "</a>";

            NotificationService nfService = new NotificationService();

            nfService.send(receiverId, post.OwnerType, msg, NotificationType.Comment);
        }
Exemplo n.º 2
0
 public ContentShare(ContentPost cpost)
 {
     this.post = cpost;
 }