No didn't try it. But I have checked chat system code and there is no way that chat system will print whisper to the party chat or party message to the whisper. Messages are sorted by category and then printed to the chat to the correct channels.
Lua Code:
category = GetChannelCategoryFromChannel(CHAT_CHANNEL_WHISPER)
--returns CHAT_CATEGORY_WHISPER_INCOMING (3)
category = GetChannelCategoryFromChannel(CHAT_CHANNEL_PARTY)
--returns CHAT_CATEGORY_PARTY (7)
If you want to use category the same way as chat system, you can change code to:
Lua Code:
local function ChatMessageChannel(eventCode, messageType, fromName, text, isFromCustomerService)
if GetChannelCategoryFromChannel(messageType) == CHAT_CATEGORY_WHISPER_INCOMING then
fromName = IsDecoratedDisplayName(fromName) and fromName or zo_strformat(SI_UNIT_NAME, fromName)
d(fromName)
if IsFriend(fromName) then
d("A friend just whispered you")
end
end
end
EVENT_MANAGER:RegisterForEvent("MyAddonName", EVENT_CHAT_MESSAGE_CHANNEL, ChatMessageChannel)
But I think it will not make any difference.