Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History module not working correctly on whispers with characters from realms with space it their name #25

Open
morningrise96 opened this issue Aug 31, 2020 · 1 comment

Comments

@morningrise96
Copy link

Describe the bug
When you're talking to someone from a realm like Defias Brotherhood or Argent Dawn for example, the messages doesn't get recorded even with 'Record everyone' option is set.

To Reproduce
Steps to reproduce the behavior:

  1. Fire up the game
  2. Message anyone from a realm with a space in the realm name
  3. Check the history, it's not recording anything

Expected behavior
With the history module enabled, it should record all whispers and show in the history table.

Additional context
I managed to track down the problem to this line in ToolBox.lua: 'user = string.gsub(user, "[A-Z]", string.lower);' in function 'WIM.FormatUserName(user)' starting at line 97.
That function gets called from WhisperEngine.lua in function 'getWhisperWindowByUser(user, isBN, bnID)' starting at line 180
'getWhisperWindowByUser(user, isBN, bnID)' gets called from 'WhisperEngine:CHAT_MSG_WHISPER(...)' starting at line 322 in WhisperEngine.lua
WhisperEngine:CHAT_MSG_WHISPER(...) calls 'PostEvent_Whisper' in the History.lua module, which calls 'recordWhisper(inbound, ...)'
and in recordWhisper (starting at line 132 in History.lua) this line get evaluated for 'nil' every time:
'local win = windows.active.whisper[from] or windows.active.chat[from] or windows.active.w2w[from];'
However, removing that one formatting option ( string.gsub(user, "[A-Z]", string.lower) ) solved the issue and everything gets recorded in the history table. Been using the addon like that for about 2 weeks now, nothing else seems to be broken without that formatting removed, but i'm using the addon only for whispers and not familiar with LUA at all, so can't really say that it is the best solution as I don't know why/if that formatting is important elsewhere.

@Pazza
Copy link
Collaborator

Pazza commented Aug 31, 2020

Thanks for the info. I'll make sure to review and figure out why its breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants