mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Fix actions posted to the wrong channel
This commit is contained in:
parent
f547afe617
commit
9132c42f87
@ -225,7 +225,7 @@ namespace osu.Game.Online.Chat
|
||||
switch (command)
|
||||
{
|
||||
case "np":
|
||||
AddInternal(new NowPlayingCommand());
|
||||
AddInternal(new NowPlayingCommand(target));
|
||||
break;
|
||||
|
||||
case "me":
|
||||
@ -235,7 +235,7 @@ namespace osu.Game.Online.Chat
|
||||
break;
|
||||
}
|
||||
|
||||
PostMessage(content, true);
|
||||
PostMessage(content, true, target);
|
||||
break;
|
||||
|
||||
case "join":
|
||||
|
@ -21,6 +21,13 @@ namespace osu.Game.Online.Chat
|
||||
[Resolved]
|
||||
private Bindable<WorkingBeatmap> currentBeatmap { get; set; }
|
||||
|
||||
private readonly Channel target;
|
||||
|
||||
public NowPlayingCommand(Channel target)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
@ -48,7 +55,7 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
var beatmapString = beatmap.OnlineBeatmapID.HasValue ? $"[{api.WebsiteRootUrl}/b/{beatmap.OnlineBeatmapID} {beatmap}]" : beatmap.ToString();
|
||||
|
||||
channelManager.PostMessage($"is {verb} {beatmapString}", true);
|
||||
channelManager.PostMessage($"is {verb} {beatmapString}", true, target);
|
||||
Expire();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user