public User SendMessage(User recipient, string message, string title) { Message msg = new Message(); msg.MessageBody = message; msg.Title = title; msg.SentTime = DateTime.Now; return SendMessage(recipient, msg); }
public User SendMessage(User recipient, Message message) { //bail if ((recipient.AllowsMessagesFromNonFriends == false) && (!recipient.Friends.Contains(this))) { return this; } recipient.Messages.Add(message); this.SentMessages.Add(message); message.Sender = this; message.Recipients.Add(recipient); return this; }