fix(broker): upsert telegram bridge on reconnect (duplicate key)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4130,6 +4130,9 @@ function main(): void {
|
|||||||
displayName: row.displayName,
|
displayName: row.displayName,
|
||||||
chatType: row.chatType,
|
chatType: row.chatType,
|
||||||
chatTitle: row.chatTitle ?? null,
|
chatTitle: row.chatTitle ?? null,
|
||||||
|
}).onConflictDoUpdate({
|
||||||
|
target: [telegramBridge.chatId, telegramBridge.meshId],
|
||||||
|
set: { active: true, disconnectedAt: null, pubkey: row.pubkey, secretKey: row.secretKey, displayName: row.displayName },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async (chatId, meshId) => {
|
async (chatId, meshId) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user