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

DF Chat Enhancements: Change the way the module uses setProperty to add to the ChatMessageData flags as it unfortunately deletes all previously set by other modules. #387

Open
thatlonelybugbear opened this issue Aug 15, 2022 · 1 comment · May be fixed by #486
Assignees
Labels
bug Something isn't working

Comments

@thatlonelybugbear
Copy link

Module
DF Chat Enhancements v4.0.0

Describe the issue
Issue mentioned here: https://discord.com/channels/170995199584108546/722566083499786352/989158818422358016

Quoting your answers from the Foundry discord that might help with context:

Yeah I'm not trying to override the flags property, just set my own value inside it, but because I happen to come last the setProperty just deletes everything in there instead of merging my single property into the existing object
I think the best workaround for this is for me to also use the string property nav since that seems to be working with multiple entries

and in response to Zhell's comment

Yeah keep yours as is. It's basically either everyone uses the loose string notation, or no one uses it and instead make proper existence checks. So I'll switch since I assume the expectation is everyone uses the loosey goosey method lol

@thatlonelybugbear thatlonelybugbear added the bug Something isn't working label Aug 15, 2022
@krbz999
Copy link

krbz999 commented Aug 15, 2022

Using foundry.utils.mergeObject should be more than sufficient. It respects 'loose string' notation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants