-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Description
I've noticed that 'self' is sometimes not parsed correctly. Here is a section of code where 'self' is a parameter; it should trigger the colon in chatSystem.textEntry:AddCommandHistory(text), correct?
do
local parts = {};
local chatSystem = CHAT_SYSTEM;
local originalAddCommandHistory = chatSystem.textEntry.AddCommandHistory;
function chatSystem.textEntry:AddCommandHistory(text)
-- Don't add the switch when chat is restored
if db.addChannelAndTargetToHistory and pChatData.isAddonInitialized then
local currentChannel = chatSystem.currentChannel;
local currentTarget = chatSystem.currentTarget;
local switch = chatSystem.switchLookup[currentChannel];
if switch ~= nil then
parts[1] = switch;
if currentTarget then
parts[2] = currentTarget;
parts[3] = text;
else
parts[2] = text;
parts[3] = nil;
end;
text = table.concat(parts, ' ');
end;
end;
originalAddCommandHistory(self, text);
end;
end;Metadata
Metadata
Assignees
Labels
No labels