mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
handle changelog link in message formatter
This commit is contained in:
parent
7fcb01bdf1
commit
47c7701e47
@ -177,6 +177,24 @@ namespace osu.Game.Online.Chat
|
|||||||
|
|
||||||
case "wiki":
|
case "wiki":
|
||||||
return new LinkDetails(LinkAction.OpenWiki, string.Join('/', args.Skip(3)));
|
return new LinkDetails(LinkAction.OpenWiki, string.Join('/', args.Skip(3)));
|
||||||
|
|
||||||
|
case "home":
|
||||||
|
if (mainArg != "changelog")
|
||||||
|
// handle link other than changelog as external for now
|
||||||
|
return new LinkDetails(LinkAction.External, url);
|
||||||
|
|
||||||
|
switch (args.Length)
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
|
// https://osu.ppy.sh/home/changelog
|
||||||
|
return new LinkDetails(LinkAction.OpenChangelog, string.Empty);
|
||||||
|
|
||||||
|
case 6:
|
||||||
|
// https://osu.ppy.sh/home/changelog/lazer/2021.1006
|
||||||
|
return new LinkDetails(LinkAction.OpenChangelog, $"{args[4]}/{args[5]}");
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user