*If responding with an existing entry, don't try to set
This commit is contained in:
parent
1b876bb78f
commit
c734832952
|
@ -108,8 +108,10 @@ const plugin: Plugin = {
|
||||||
}
|
}
|
||||||
let entry = (await getEntry(newEntry.pk)) as SignedRegistryEntry;
|
let entry = (await getEntry(newEntry.pk)) as SignedRegistryEntry;
|
||||||
|
|
||||||
async function setAndRespond(entry: SignedRegistryEntry) {
|
async function setAndRespond(entry: SignedRegistryEntry, set = true) {
|
||||||
await setEntry(newEntry);
|
if (set) {
|
||||||
|
await setEntry(newEntry);
|
||||||
|
}
|
||||||
sendDirectOrBroadcast(
|
sendDirectOrBroadcast(
|
||||||
Message.create({
|
Message.create({
|
||||||
type: MessageType.CREATED,
|
type: MessageType.CREATED,
|
||||||
|
@ -127,7 +129,7 @@ const plugin: Plugin = {
|
||||||
setAndRespond(newEntry);
|
setAndRespond(newEntry);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setAndRespond(entry);
|
setAndRespond(entry, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setAndRespond(newEntry);
|
setAndRespond(newEntry);
|
||||||
|
|
Reference in New Issue