Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Security Level: Public
-
None
-
CBG Sprint 149
-
1
Description
UnmarshalDocumentSyncDataFromFeed doesn't seem to return any user xattrs defined on a doc if the doc doesn't have any sync xattr defined.
Repro steps:
- Have a db setup with a sync function assigning a channel defined in your defined user xattr on the database
- Add doc through SDK with user xattr defined
- Wait for import feed to pick up the doc
Example sync function to use:
function(doc, oldDoc, meta) {
|
if (meta.xattrs.channels === undefined) { |
console.log("no user_xattr_key defined"); |
throw ({ |
forbidden: "Missing required property - metadata channel info" |
});
|
} else { |
console.log(meta.xattrs.channels);
|
channel(meta.xattrs.channels);
|
}
|
}
|