If messages are correcly displayed in the chat, there must be something wrong in your code (like single = instead of double == in the condtion). Chat doesn't use anything else then messageType.
Lua Code:
local function ChatMessageChannel(eventCode, messageType, fromName, text, isFromCustomerService)
if messageType == CHAT_CHANNEL_WHISPER 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)
Message types are listed here:
http://wiki.esoui.com/Globals#MsgChannelType