Fix beatmap discussion links wrongly leading to beatmap page

This commit is contained in:
Joseph Madamba 2021-06-20 21:37:00 -07:00
parent 8b2110c048
commit 6fda5e569a
1 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,10 @@ public static LinkDetails GetLinkDetails(string url)
case "beatmapsets":
case "d":
{
if (mainArg == "discussions")
// handle discussion links externally for now
return new LinkDetails(LinkAction.External, url);
if (args.Length > 4 && int.TryParse(args[4], out var id))
// https://osu.ppy.sh/beatmapsets/1154158#osu/2768184
return new LinkDetails(LinkAction.OpenBeatmap, id.ToString());