Compare commits

..

3 Commits

Author SHA1 Message Date
Christian Kellner
25cc7fb650 next release version 2025-07-22 20:01:01 +02:00
Alexander Roidl
78df4b21a6 Remove leading commas from listings in Telegram messages (#142) 2025-07-22 19:58:16 +02:00
weakmap@gmail.com
d89b078237 lol 2025-07-19 22:41:30 +02:00
6 changed files with 17 additions and 12 deletions

View File

@@ -22,16 +22,18 @@ export const send = ({ serviceName, newListings, notificationConfig, jobKey }) =
const { token, chatId } = notificationConfig.find((adapter) => adapter.id === config.id).fields;
const job = getJob(jobKey);
const jobName = job == null ? jobKey : job.name;
//we have to split messages into chunk, because otherwise messages are going to become too big and will fail
// we have to split messages into chunks, because otherwise messages are going to become too big and will fail
const chunks = arrayChunks(newListings, MAX_ENTITIES_PER_CHUNK);
const promises = chunks.map((chunk) => {
let message = `<i>${jobName}</i> (${serviceName}) found <b>${newListings.length}</b> new listings:\n\n`;
message += chunk.map(
const messageParagraphs = [];
messageParagraphs.push(`<i>${jobName}</i> (${serviceName}) found <b>${newListings.length}</b> new listings:`);
messageParagraphs.push(...chunk.map(
(o) =>
`<a href='${o.link}'><b>${shorten(o.title.replace(/\*/g, ''), 45).trim()}</b></a>\n` +
[o.address, o.price, o.size].join(' | ') +
'\n\n',
);
[o.address, o.price, o.size].join(' | ')
));
/**
* This is to not break the rate limit. It is to only send 1 message per second
*/
@@ -41,7 +43,7 @@ export const send = ({ serviceName, newListings, notificationConfig, jobKey }) =
method: 'post',
body: JSON.stringify({
chat_id: chatId,
text: message,
text: messageParagraphs.join('\n\n'),
parse_mode: 'HTML',
disable_web_page_preview: true,
}),

View File

@@ -1,6 +1,6 @@
{
"name": "fredy",
"version": "11.2.5",
"version": "11.2.6",
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
"scripts": {
"start": "node prod.js",

View File

@@ -40,4 +40,8 @@ a:active {
color: #54a9ff;
background-color: transparent;
text-decoration: underline;
}
}
.semi-icon {
vertical-align: middle;
}

View File

@@ -14,7 +14,6 @@ const saveResponse = async (analyticsEnabled) => {
export default function TrackingModal() {
if(inDevelopment()){
console.log("FFFUUUCCCKKK")
return null;
}

View File

@@ -1,6 +1,6 @@
import React from 'react';
import {format} from '../../services/time/timeService';
import {Banner, Descriptions} from '@douyinfe/semi-ui';
import {Descriptions} from '@douyinfe/semi-ui';
export default function ProcessingTimes({processingTimes = {}}) {
if (Object.keys(processingTimes).length === 0) {

View File

@@ -101,7 +101,7 @@ export default function ProviderMutator({ onVisibilityChanged, visible = false,
description={
<div>
<p>
Currently, our Immoscout implementation does not drawing shapes on a map. Use a radius instead.
Currently, our Immoscout implementation does not support drawing shapes on a map. Use a radius instead.
</p>
</div>
}