mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
tiny fixes
This commit is contained in:
parent
1581464d8c
commit
ef1c840aa7
@ -15,7 +15,8 @@ const ENTITY_NAME_TO_ENTITY = {
|
|||||||
"note_revisions": NoteRevision,
|
"note_revisions": NoteRevision,
|
||||||
"recent_notes": RecentNote,
|
"recent_notes": RecentNote,
|
||||||
"options": Option,
|
"options": Option,
|
||||||
"api_tokens": ApiToken
|
"api_tokens": ApiToken,
|
||||||
|
"links": Link
|
||||||
};
|
};
|
||||||
|
|
||||||
function getEntityFromEntityName(entityName) {
|
function getEntityFromEntityName(entityName) {
|
||||||
|
@ -52,6 +52,7 @@ async function sendMessage(client, message) {
|
|||||||
async function sendMessageToAllClients(message) {
|
async function sendMessageToAllClients(message) {
|
||||||
const jsonStr = JSON.stringify(message);
|
const jsonStr = JSON.stringify(message);
|
||||||
|
|
||||||
|
if (webSocketServer) {
|
||||||
log.info("Sending message to all clients: " + jsonStr);
|
log.info("Sending message to all clients: " + jsonStr);
|
||||||
|
|
||||||
webSocketServer.clients.forEach(function each(client) {
|
webSocketServer.clients.forEach(function each(client) {
|
||||||
@ -60,6 +61,7 @@ async function sendMessageToAllClients(message) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function sendPing(client, lastSentSyncId) {
|
async function sendPing(client, lastSentSyncId) {
|
||||||
const syncData = await sql.getRows("SELECT * FROM sync WHERE id > ?", [lastSentSyncId]);
|
const syncData = await sql.getRows("SELECT * FROM sync WHERE id > ?", [lastSentSyncId]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user