修改了同步oper的判断条件,即使是自身用户,只要不是同步的oper,在这里也同步
This commit is contained in:
parent
505eb74bd6
commit
2efe695aa0
|
|
@ -229,7 +229,7 @@ class Synchronizer {
|
|||
this.pushOperToChannel(oper2, userId, url, endpoint, entity, entityId, selfEncryptInfo, onSynchronized);
|
||||
};
|
||||
for (const userId in userSendDict) {
|
||||
if (userId !== operatorId) {
|
||||
if (userId !== operatorId || oper.bornAt) {
|
||||
await pushToUserIdFn(userId);
|
||||
pushed = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ export default class Synchronizer<ED extends EntityDict & BaseEntityDict, Cxt ex
|
|||
};
|
||||
|
||||
for (const userId in userSendDict) {
|
||||
if (userId !== operatorId) {
|
||||
if (userId !== operatorId || oper.bornAt) {
|
||||
await pushToUserIdFn(userId);
|
||||
pushed = true;
|
||||
}
|
||||
|
|
@ -560,7 +560,7 @@ export default class Synchronizer<ED extends EntityDict & BaseEntityDict, Cxt ex
|
|||
action: 'create',
|
||||
when: 'commit',
|
||||
strict: 'makeSure',
|
||||
check: (operation: ED['oper']['Create']) => {
|
||||
check: (operation: ED['oper']['Create']) => {
|
||||
const { data } = operation as ED['oper']['CreateSingle'];
|
||||
const { targetEntity, action } = data;
|
||||
return pushEntities.includes((<ED['oper']['CreateSingle']['data']>data).targetEntity!)
|
||||
|
|
|
|||
Loading…
Reference in New Issue