1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:02:55 +08:00

Merge pull request #13643 from LeNitrous/prevent-system-context-menu

Prevent context menu from showing from system messages
This commit is contained in:
Dean Herbert 2021-06-24 13:24:12 +09:00 committed by GitHub
commit 8b06dd3302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,12 +240,15 @@ namespace osu.Game.Overlays.Chat
{
get
{
if (sender.Equals(User.SYSTEM_USER))
return Array.Empty<MenuItem>();
List<MenuItem> items = new List<MenuItem>
{
new OsuMenuItem("View Profile", MenuItemType.Highlighted, Action)
};
if (sender.Id != api.LocalUser.Value.Id)
if (!sender.Equals(api.LocalUser.Value))
items.Add(new OsuMenuItem("Start Chat", MenuItemType.Standard, startChatAction));
return items.ToArray();