mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 22:06:08 +08:00
Naively "send" messages that the user types (doesn't arrive yet).
This commit is contained in:
parent
4afa434962
commit
e3fa49dda7
@ -82,7 +82,20 @@ namespace osu.Game.Overlays
|
|||||||
private void postMessage(TextBox sender, bool newText)
|
private void postMessage(TextBox sender, bool newText)
|
||||||
{
|
{
|
||||||
var postText = sender.Text;
|
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;
|
sender.Text = string.Empty;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user