Storage service write improvements
This commit is contained in:
parent
459eebcd90
commit
b879c73b86
2 changed files with 43 additions and 19 deletions
|
@ -45,13 +45,20 @@ function addUnknownFields(
|
|||
): void {
|
||||
if (record.__unknownFields) {
|
||||
window.log.info(
|
||||
`storageService.addUnknownFields: Unknown fields found for ${conversation.get(
|
||||
'id'
|
||||
)}`
|
||||
'storageService.addUnknownFields: Unknown fields found for',
|
||||
conversation.debugID()
|
||||
);
|
||||
conversation.set({
|
||||
storageUnknownFields: arrayBufferToBase64(record.__unknownFields),
|
||||
});
|
||||
} else if (conversation.get('storageUnknownFields')) {
|
||||
// If the record doesn't have unknown fields attached but we have them
|
||||
// saved locally then we need to clear it out
|
||||
window.log.info(
|
||||
'storageService.addUnknownFields: Clearing unknown fields for',
|
||||
conversation.debugID()
|
||||
);
|
||||
conversation.unset('storageUnknownFields');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue