knadh / listmonk

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
https://listmonk.app
GNU Affero General Public License v3.0
14.54k stars 1.33k forks source link

Merging attributes instead of overwriting them, when importing subscribers #2010

Open benstaf opened 3 weeks ago

benstaf commented 3 weeks ago

When importing subscribers, It would be nice to have the option to merge attributes instead of overwriting vs. not-overwriting them

Screenshot_2024-08-23-10-00-16-204_com android chrome-edit

For example, if I have alice@alice.com with attributes { 'hobbies': ['swimming','cooking']}and then import again alice@alice.com with attributes { 'hobbies': ['dancing','gardening']} , it would be nice to get alice@alice.com with attributes { 'hobbies': ['swimming','cooking','dancing','gardening']}

This would be in addition to the option of re-importing vs. skipping existing subscribers, mentioned in issue https://github.com/knadh/listmonk/issues/1883 (still unsolved)

knadh commented 3 weeks ago

Recursively merging arbitrary attributes in the database, the hobbies[] array for example, is unfortunately not technically feasible.