コード例 #1
0
ファイル: Comment.cs プロジェクト: davelondon/dontstayin
		static CommentMessageStub getChatMessage(Guid roomGuid, Guid pinRoomGuid, Comment newComment, Thread parentThread, Usr postingUsr, string chatMessageBody)
		{
			return new CommentMessageStub(
				newComment.ChatItemGuid.Value.Pack(),
				ItemType.CommentChatMessage,
				newComment.DateTime.Ticks.ToString(),
				roomGuid.Pack(),
				postingUsr.NickName,
				postingUsr.StmuParams,
				postingUsr.K,
				postingUsr.HasPic ? postingUsr.Pic.ToString() : "0",
				postingUsr.HasChatPic ? postingUsr.ChatPic.Value.ToString() : "0",
				chatMessageBody,
				pinRoomGuid.Pack(),
				newComment.UrlRefresher(),
				parentThread.Subject.TruncateWithDots(30)
			);
		}
コード例 #2
0
ファイル: Lol.cs プロジェクト: davelondon/dontstayin
		static LaughStub getLaughStub(ItemType itemType, Guid roomGuid, Comment fullComment)
		{
			return new LaughStub(
						Guid.NewGuid().Pack(),
						itemType,
						DateTime.Now.Ticks.ToString(),
						roomGuid.Pack(),
						Usr.Current.NickName,
						Usr.Current.StmuParams,
						Usr.Current.K,
						Usr.Current.HasPic ? Usr.Current.Pic.ToString() : "0",
						Usr.Current.HasChatPic ? Usr.Current.ChatPic.Value.ToString() : "0",
						Chat.GetMessageFromCommentBody(fullComment.Text),
						fullComment.Thread.GetRoomSpec().Guid.Pack(),
						fullComment.UrlRefresher(),
						fullComment.Thread.Subject.TruncateWithDots(50));
		}
コード例 #3
0
ファイル: Comment.cs プロジェクト: davelondon/dontstayin
		private static void SendTopicNotificationEmail(Thread parentThread, Usr postingUsr, Comment newComment, ThreadUsr tuAlert)
		{
			Mailer usrMail = new Mailer();
			Usr u = tuAlert.Usr;

			//Insert something in here to send chat items?...

			usrMail.Subject = postingUsr.NickName + " comments in: \"" + parentThread.SubjectSnip(40) + "\"";
			usrMail.Body += "<h1>" + postingUsr.NickName + " has posted a comment</h1>";
			usrMail.Body += "<p>The subject of the topic is: \"" + parentThread.Subject + "\"</p>";
			usrMail.Body += "<p>To read and reply, check out the <a href=\"[LOGIN]\">topic page</a>.</p>";
			usrMail.Body += "<p>We won't send you any more alerts about this topic until you move it out of your inbox. To stop receiving these emails, click the <i>Ignore this topic</i> button on the topic page.</p>";
			usrMail.TemplateType = Mailer.TemplateTypes.AnotherSiteUser;
			usrMail.RedirectUrl = newComment.UrlRefresher(parentThread);
			usrMail.UsrRecipient = u;
			usrMail.To = u.Email;
			usrMail.Bulk = parentThread.TotalParticipants > 5;
			usrMail.Inbox = true;
			usrMail.Send();
		}