From e3fa49dda7ad911731b08c71b1f2baa52f0d81a7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 20 Feb 2017 21:10:43 +0900 Subject: [PATCH] Naively "send" messages that the user types (doesn't arrive yet). --- osu.Game/Overlays/ChatOverlay.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 40226eb1cf..b93acc46cb 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -82,7 +82,20 @@ namespace osu.Game.Overlays private void postMessage(TextBox sender, bool newText) { var postText = sender.Text; - //todo: do something with postText. + + if (!string.IsNullOrEmpty(postText)) + { + //todo: actually send to server + careChannels.FirstOrDefault()?.AddNewMessages(new[] + { + new Message + { + User = api.LocalUser.Value, + Timestamp = DateTimeOffset.Now, + Content = postText + } + }); + } sender.Text = string.Empty; }