示例#1
0
 public static Common.Message UserLeftMessage(PoshBotTestServer.Common.User User, ChatRoom room)
 {
     Common.Message msg = new Common.Message();
     msg.ChannelId    = room.RoomID.ToString();
     msg.ChannelName  = room.Name;
     msg.FromUserId   = 0;
     msg.FromUsername = "******";
     msg.Subtype      = Common.MessageSubtype.ChannelLeft;
     msg.Type         = Common.MessageType.Message;
     msg.Text         = User.Username + " has left " + room.Name;
     return(msg);
 }
示例#2
0
 public static Common.Message RoomMessage(PoshBotTestServer.Common.User User, ChatRoom room, String Text)
 {
     Common.Message msg = new Common.Message();
     msg.ChannelId    = room.RoomID.ToString();
     msg.ChannelName  = room.Name;
     msg.FromUserId   = User.UserId;
     msg.FromUsername = User.Username;
     msg.Subtype      = Common.MessageSubtype.None;
     msg.Type         = Common.MessageType.Message;
     msg.Text         = Text;
     return(msg);
 }
示例#3
0
 public static Common.Message FromServerMessage(PoshBotTestServer.Common.User User, String Message)
 {
     Common.Message msg = new Common.Message();
     msg.ChannelId    = null;
     msg.FromUserId   = 0;
     msg.FromUsername = "******";
     msg.ToUserId     = User.UserId;
     msg.ToUsername   = User.Username;
     msg.Subtype      = Common.MessageSubtype.None;
     msg.Type         = Common.MessageType.Message;
     msg.Text         = Message;
     return(msg);
 }