2ndbrain 2026.1.36 → 2026.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/embeddings/worker.js +1 -0
- package/src/index.js +5 -0
- package/src/telegram/bot.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "2ndbrain",
|
|
3
|
-
"version": "2026.1
|
|
3
|
+
"version": "2026.2.1",
|
|
4
4
|
"description": "Always-on Node.js service bridging Telegram messaging to Claude AI with knowledge graph, journal, project management, and semantic search.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/src/embeddings/worker.js
CHANGED
package/src/index.js
CHANGED
|
@@ -504,6 +504,11 @@ async function main() {
|
|
|
504
504
|
embeddingsEngine,
|
|
505
505
|
};
|
|
506
506
|
|
|
507
|
+
// Catch emitted errors so they don't throw (Node.js EventEmitter behaviour)
|
|
508
|
+
bot.on('error', (err) => {
|
|
509
|
+
logger.error('telegram', `Bot error: ${err.message}`);
|
|
510
|
+
});
|
|
511
|
+
|
|
507
512
|
// Wire message handler
|
|
508
513
|
bot.on('message', (msg) => {
|
|
509
514
|
handleMessage(msg, deps).catch((err) => {
|
package/src/telegram/bot.js
CHANGED
|
@@ -261,7 +261,7 @@ class TelegramBot extends EventEmitter {
|
|
|
261
261
|
* @returns {Promise<object[]>} Array of sent message results
|
|
262
262
|
*/
|
|
263
263
|
async sendMessage(chatId, text, options = {}) {
|
|
264
|
-
const parseMode = options.parse_mode
|
|
264
|
+
const parseMode = 'parse_mode' in options ? options.parse_mode : 'MarkdownV2';
|
|
265
265
|
const chunks = this._chunkText(text, MAX_MESSAGE_LENGTH);
|
|
266
266
|
const results = [];
|
|
267
267
|
|