Legacy-of-Sylvanaar / wow-instant-messenger

WIM (WoW Instant Messenger) is a World of Warcraft addon which brings an instant messenger feel to communication in game.
https://www.curseforge.com/wow/addons/wim-3
MIT License
11 stars 8 forks source link

Linking item with ranks still fails #33

Closed k1ck3r closed 1 year ago

k1ck3r commented 1 year ago

Hello,

saw in latest changelog that it's now possible to link ranked items with WIM. Unfortunately, whispering a guildie returns the following error:

2x WIM/Modules/WhisperEngine.lua:267: ChatThrottleLib:SendChatMessage(): message length cannot exceed 255 bytes
[string "=[C]"]: in function `error'
[string "@BugSack/Libs/AceComm-3.0-12/ChatThrottleLib.lua"]:425: in function `SendChatMessage'
[string "@WIM/Modules/WhisperEngine.lua"]:267: in function `SendSplitMessage'
[string "@WIM/Modules/WhisperEngine.lua"]:296: in function `fun'
[string "@WIM/Sources/WindowHandler.lua"]:437: in function <WIM/Sources/WindowHandler.lua:429>
[string "@WIM/Sources/WindowHandler.lua"]:753: in function <WIM/Sources/WindowHandler.lua:753>

Locals:
(*temporary) = "ChatThrottleLib:SendChatMessage(): message length cannot exceed 255 bytes"

Obviously most probably it's limitation issue only, but wanted to be sure that i've shared my experience. Item used in this is of course Elemental Lariat 418 ilvl

Pazza commented 1 year ago

Hrm. I thought we crushed this one. It shouldn't be an issue with the item link itself. That message is more related to too long of a message. Are you sending more than just the link? I was having a hard time coming up with a better algorithm of splitting the message when there aren't any spaces before and after the item link. Can you confirm at least that you are not getting the error when you send ONLY the item link?

k1ck3r commented 1 year ago

I'm sending the link through shift+click in WIM window. Until now, what i've tried nothing returned proper results :/

JimJoyyy commented 1 year ago

definitelly does still occur with just itemlink, although its only on some of the items. personally noticed it happening on embelished items, so its likely just the matter of them having a lot of additional tags. to be specific im having the issue with 3socket lariat, embelished engi wrists, and an embelished crafted ring. itemlinks from the crafting menu do still work, its only the already crafted items that have the issue. these links do go through when wim is disabled, so its definitelly on the addon side

zaphon commented 1 year ago

Can confirm this is happening to me as well. Only way to link items is to disable WIM.

Pazza commented 1 year ago

I have to figure out how to fix this with better message splitting. The problem is the max character size for a message is 255 characters. These links are packing a lot of data in them. If you include anything other than just the link, you're likely exceeding the limit and causing the Chat Throttle Lib to error out. Sending a link alone in one message should mitigate this until I can come up with a more reliable way of splitting the message. It should work fine as long as there is a space between the item and and other text. But the error you are getting is definitely due to the message being over 255 characters.