This commit is contained in:
Ulf Gebhardt 2023-05-30 09:19:28 +02:00
parent db38090006
commit fa7e9ee574
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -215,9 +215,7 @@ async function writeFederatedHomeCommunityEntries(pubKey: string): Promise<Commu
async function writeHomeCommunityEntry(pubKey: string): Promise<void> {
try {
// check for existing homeCommunity entry
let homeCom = await DbCommunity.findOne({
foreign: false,
})
let homeCom = await DbCommunity.findOne({ foreign: false })
if (homeCom) {
// simply update the existing entry, but it MUST keep the ID and UUID because of possible relations
homeCom.publicKey = Buffer.from(pubKey)