ne0bot / telegram-sender-adapter

A simple adapter exposing actions to Telegram notfications through the Mozilla IoT Gateway.
Mozilla Public License 2.0
1 stars 5 forks source link

Broadcast Title #15

Open geohau opened 3 years ago

geohau commented 3 years ago

Hello Mr Stegeman, I am not sure if I am asking in the right place. I use the Telegram sender adapter. Unfortunately, when transmitting, the title is not transmitted, but the text "(NOTICE)" or ("ALERT)". I suspect this is at this point. async notify(title, message, level) { console.log( Sending Telegram with message "${message}", and level "${level}" );

switch (level) {
  case Constants.NotificationLevel.LOW:
  case Constants.NotificationLevel.NORMAL:
    message = `(NOTICE) ${message}`;
    break;
  case Constants.NotificationLevel.HIGH:
    message = `(ALERT) ${message}`;
    break;
}

await sendNotification(message);

Can this be changed? With kind regards GeoHau