mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix(export) - Issue 12482 - Fix messages in xml export.
This commit is contained in:
@@ -112,14 +112,15 @@ async function _getUserDataForExport (user, xmlMode = false) {
|
||||
// object maps cant be parsed
|
||||
userData.inbox.messages = _(userData.inbox.messages)
|
||||
.map(m => {
|
||||
const flags = Object.keys(m.flags);
|
||||
m.flags = flags;
|
||||
m.flags = Object.keys(m.flags);
|
||||
|
||||
return m;
|
||||
})
|
||||
.value();
|
||||
|
||||
// _id gets parsed as an bytearray => which gets casted to a chararray => "weird chars"
|
||||
userData.newMessages = _.map(userData.newMessages, (msg, id) => ({ id, ...msg }));
|
||||
|
||||
// _id gets parsed as a bytearray => which gets cast to a chararray => "weird chars"
|
||||
userData.unpinnedItems = userData.unpinnedItems.map(i => ({
|
||||
path: i.path,
|
||||
type: i.type,
|
||||
|
||||
Reference in New Issue
Block a user