Skip to content

Commit

Permalink
Attempt to fix censored message display (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
plusmouse committed Oct 6, 2023
1 parent 88d35cc commit 342678c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion addon/addon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,19 @@ function addon:ChatFrame_MessageEventHandler(this, event, ...)
if m.DONOTPROCESS then
Prat.callbacks:Fire(POST_ADDMESSAGE_BLOCKED, m, this, message.EVENT, m.OUTPUT, r, g, b, id)
elseif m.OUTPUT:len() > 0 then
this:AddMessage(m.OUTPUT, r, g, b, id, m.ACCESSID, m.TYPEID);

-- Hack to get the censored message display working with Prat
print(arg11)
local isChatLineCensored = C_ChatInfo.IsChatLineCensored(arg11);
local msg = isChatLineCensored and arg1 or m.OUTPUT

if isChatLineCensored then
local eventLabel = event
local eventArgs = SafePack(...);
this:AddMessage(msg, r, g, b, id, m.ACCESSID, m.TYPEID, eventLabel, eventArgs);
else
this:AddMessage(msg, r, g, b, id, m.ACCESSID, m.TYPEID);
end

-- We have called addmessage by now, or we have skipped it
-- regardless, we call postaddmessage. This was changed to allow
Expand Down

0 comments on commit 342678c

Please sign in to comment.