Open PoBruno opened 2 months ago
why did you remove the if (state.settings.DiscordPrefix)
check? Wouldn't this add username to all messages regardless of this option?
You're correct that removing the if (state.settings.DiscordPrefix)
check would result in the DisplayName being added to all messages, regardless of whether this option is enabled in the settings.
The intention behind my change was to ensure that the DisplayName of the Discord user is consistently included in the messages sent to WhatsApp. However, I understand that this might not align with the configurable nature of the DiscordPrefix setting.
I'll update the implementation to reintroduce the check, ensuring that the DisplayName is only appended when state.settings.DiscordPrefix is enabled
. This way, we maintain the intended behavior and allow users to control this feature through the settings.
Additionally, my next idea is to implement a configuration option that would allow users to choose whether they want the messages sent from Discord to WhatsApp to include the user's DisplayName or to simply send the message without any additional formatting.
I'll push the necessary changes shortly. Let me know if you have any further suggestions or concerns.
Description:
This PR adds functionality to format messages sent from Discord to WhatsApp. Key changes include:
This enhancement ensures that messages forwarded to WhatsApp clearly identify the Discord user who sent them.