public static bool bulk_send_message(Guid applicationId, Message message) { List <Message> lst = new List <Message>(); lst.Add(message); return(MSGController.bulk_send_message(applicationId, lst)); }
public static bool send_message(Guid applicationId, Guid senderUserId, Guid receiverUserId, string title, string messageText) { List <Guid> lst = new List <Guid>(); lst.Add(receiverUserId); return(MSGController.bulk_send_message(applicationId, senderUserId, lst, title, messageText)); }
public static List <Users.User> get_message_receivers(Guid applicationId, Guid messageId, int?count = null, int?lastId = null) { List <Guid> mIds = new List <Guid>(); mIds.Add(messageId); List <Users.User> users = new List <Users.User>(); Message msg = MSGController._get_message_receivers(applicationId, mIds, count, lastId).FirstOrDefault(); return(msg == null ? users : msg.ReceiverUsers); }
public static List <Users.User> get_thread_users(Guid applicationId, Guid threadId, Guid userId, int?count = null, int?lastId = null) { List <Guid> tIds = new List <Guid>(); tIds.Add(threadId); List <Users.User> users = new List <Users.User>(); ThreadInfo ti = MSGController._get_thread_users(applicationId, tIds, userId, count, lastId).FirstOrDefault(); return(ti == null ? users : ti.ThreadUsers); }
public static bool bulk_send_message(Guid applicationId, Guid senderUserId, List <Guid> receiverUserIds, string title, string messageText) { List <User> _receiverUsers = new List <User>(); foreach (Guid uId in receiverUserIds) { _receiverUsers.Add(new User() { UserID = uId }); } return(MSGController.bulk_send_message(applicationId, new Message() { MessageID = Guid.NewGuid(), SenderUserID = senderUserId, Title = title, MessageText = messageText, ReceiverUsers = _receiverUsers })); }
public static List <ThreadInfo> get_thread_users(Guid applicationId, List <Guid> threadIds, Guid userId, int?count = null) { return(MSGController._get_thread_users(applicationId, threadIds, userId, count)); }
public static List <Message> get_message_receivers(Guid applicationId, List <Guid> messageIds, int?count = null) { return(MSGController._get_message_receivers(applicationId, messageIds, count)); }