I'm currently writing an addon which has an Option to accept whispers from other players and rewhispers them with some data. This addon also has an Option to not show those whispers.
I use the blizz-AddMessageEventFilter API to do so. a search in this forums said, that WIM would respect this method and also block those whispers, but it doesn't. Without WIM everything is okay, but when i enable WIM the whispers get shown in WIM.
This is what I do:
ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", BlockIncomingChatFrame_OnEvent)
function BlockIncomingChatFrame_OnEvent(msg)
if is_whisper(msg, "Incoming") then
return true, msg;
end;
return false, msg;
end
The function is_whisper() contains my logic to detect if the whisper should be blocked or not. It seems that everything is okay with this function since without WIM everything works as intendet.
Can you imagine what went wrong?