Skip to content

Commit 88683ce

Browse files
committed
[Fixes #174] Prevent lua error when channel is secret
1 parent 63c30ac commit 88683ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Core/Messages.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ end
10151015
local function GetChannelDecorated(zoneID, channelID, channelName, isSecret)
10161016
local decorated = "|Hchannel:channel:"..channelID.."|h[" .. ResolvePrefixedChannelName(channelName) .. "]|h "
10171017

1018-
if isSecret and addonTable.Modifiers.ShortenPatterns then
1018+
if isSecret and addonTable.Modifiers.ShortenPatterns and not issecretvalue(decorated) then -- TODO: Only show prefix from ResolvePrefixedChannelName if pattern is set to that
10191019
return decorated:gsub(addonTable.Modifiers.ShortenPatterns.channel.p, addonTable.Modifiers.ShortenPatterns.channel.r({typeInfo = {channel = {index = channelID, zoneID = zoneID}}}), 1)
10201020
end
10211021
return decorated

0 commit comments

Comments
 (0)