1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:22:54 +08:00

Naively "send" messages that the user types (doesn't arrive yet).

This commit is contained in:
Dean Herbert 2017-02-20 21:10:43 +09:00
parent 4afa434962
commit e3fa49dda7
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -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;
}