dont log summary valued, as they can contain PII
This commit is contained in:
parent
750f3cd8ff
commit
9685ef4dd3
2 changed files with 5 additions and 10 deletions
|
@ -158,7 +158,7 @@ export class Room extends BaseRoom {
|
||||||
summaryChanges = this._summary.writeData(summaryChanges, txn);
|
summaryChanges = this._summary.writeData(summaryChanges, txn);
|
||||||
}
|
}
|
||||||
if (summaryChanges) {
|
if (summaryChanges) {
|
||||||
log.set("summaryChanges", summaryChanges.diff(this._summary.data));
|
log.set("summaryChanges", summaryChanges.changedKeys(this._summary.data));
|
||||||
}
|
}
|
||||||
// fetch new members while we have txn open,
|
// fetch new members while we have txn open,
|
||||||
// but don't make any in-memory changes yet
|
// but don't make any in-memory changes yet
|
||||||
|
|
|
@ -203,16 +203,11 @@ export class SummaryData {
|
||||||
this.cloned = copy ? true : false;
|
this.cloned = copy ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff(other) {
|
changedKeys(other) {
|
||||||
const props = Object.getOwnPropertyNames(this);
|
const props = Object.getOwnPropertyNames(this);
|
||||||
return props.reduce((diff, prop) => {
|
return props.filter(prop => {
|
||||||
if (prop !== "cloned") {
|
return prop !== "cloned" && this[prop] !== other[prop]
|
||||||
if (this[prop] !== other[prop]) {
|
});
|
||||||
diff[prop] = this[prop];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return diff;
|
|
||||||
}, {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneIfNeeded() {
|
cloneIfNeeded() {
|
||||||
|
|
Reference in a new issue