mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:42: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)
|
switch (command)
|
||||||
{
|
{
|
||||||
case "np":
|
case "np":
|
||||||
AddInternal(new NowPlayingCommand());
|
AddInternal(new NowPlayingCommand(target));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "me":
|
case "me":
|
||||||
@ -235,7 +235,7 @@ namespace osu.Game.Online.Chat
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PostMessage(content, true);
|
PostMessage(content, true, target);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "join":
|
case "join":
|
||||||
|
@ -21,6 +21,13 @@ namespace osu.Game.Online.Chat
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private Bindable<WorkingBeatmap> currentBeatmap { get; set; }
|
private Bindable<WorkingBeatmap> currentBeatmap { get; set; }
|
||||||
|
|
||||||
|
private readonly Channel target;
|
||||||
|
|
||||||
|
public NowPlayingCommand(Channel target)
|
||||||
|
{
|
||||||
|
this.target = target;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.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();
|
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();
|
Expire();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user