public void SendMessage(string inputText)
        {
            var channelId = SelectChannelService.SelectingChannelId;

            MessageDAO.SendMessage(inputText, channelId);
            ReadMessageService.RefleshMessageLog?.Invoke();
        }
Exemplo n.º 2
0
        public static void SendMessage(string?text)
        {
            var message = new Message();

            var currentChannel = ChannelService.CurrentChannel;

            if (currentChannel == null && text == "")
            {
                return;
            }

            message.ChannelId         = currentChannel.Id;
            message.User              = LoginService.LoginService.LoginUser;
            message.Text              = text;
            message.Time              = DateTime.Now;
            message.ParentMessageId   = ReplyMessage.Id;
            message.DisplaysToChannel = true;

            MessageDAO.SendMessage(message);

            MessageSent?.Invoke();
        }