From d893e42e1e497db95806fd7fad27a02b6e14741b Mon Sep 17 00:00:00 2001 From: Buds Date: Sat, 21 Sep 2024 20:36:57 +0200 Subject: [PATCH] Linking an aura can't add url in chat for China region fixed #5430 --- .../AceGUIWidget-WeakAurasDisplayButton.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua index 65c3dd8e01..5bf3456b91 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua @@ -488,11 +488,17 @@ local methods = { fullName = name end end - local url = "" - if self.data.url then - url = " ".. self.data.url + + if GetCurrentRegion() ~= 5 then -- 5 is for China, region doesn't allow links in chat + local url = "" + if self.data.url then + url = " ".. self.data.url + end + editbox:Insert("[WeakAuras: "..fullName.." - "..self.data.id.."]"..url) + else + editbox:Insert("[WeakAuras: "..fullName.." - "..self.data.id.."]") end - editbox:Insert("[WeakAuras: "..fullName.." - "..self.data.id.."]"..url) + OptionsPrivate.Private.linked = OptionsPrivate.Private.linked or {} OptionsPrivate.Private.linked[self.data.id] = GetTime() elseif not self.data.controlledChildren then