Added redirect to GSMarena smartphone. #9

Closed
DaviisDev wants to merge 1 commit from patch-1 into main
DaviisDev commented 2024-09-08 14:29:22 +00:00 (Migrated from github.com)
No description provided.
lucmsilva651 commented 2024-09-08 14:30:30 +00:00 (Migrated from github.com)

@DaviisDev Hey, thank you! I will test this more further and see if it will go to the main branch. Hope you doing good!

@DaviisDev Hey, thank you! I will test this more further and see if it will go to the main branch. Hope you doing good!
lucmsilva651 (Migrated from github.com) requested changes 2024-09-08 14:36:26 +00:00
lucmsilva651 (Migrated from github.com) left a comment

You forgot to put the quotation marks ("") before and after the deviceNURL value, and after doing that on my side, it returns this (I used a Galaxy S10e search to test it):

Unhandled Rejection at: Promise {
  <rejected> TelegramError: 400: Bad Request: can't parse entities: Unexpected end of name token at byte offset 109
      at Telegram.callApi (C:\Users\Admin\Documents\lynx\node_modules\telegraf\lib\core\network\client.js:315:19)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    response: {
      ok: false,
      error_code: 400,
      description: "Bad Request: can't parse entities: Unexpected end of name token at byte offset 109"
    },
    on: { method: 'editMessageText', payload: [Object] }
  }
} reason: TelegramError: 400: Bad Request: can't parse entities: Unexpected end of name token at byte offset 109
    at Telegram.callApi (C:\Users\Admin\Documents\lynx\node_modules\telegraf\lib\core\network\client.js:315:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  response: {
    ok: false,
    error_code: 400,
    description: "Bad Request: can't parse entities: Unexpected end of name token at byte offset 109"
  },
  on: {
    method: 'editMessageText',
    payload: {
      chat_id: -1002168151527,
      message_id: 80,
      inline_message_id: undefined,
      parse_mode: 'HTML',
      disable_web_page_preview: false,
      text: '<b><a href="tg://user?id=6723363421">Lucas Gabriel</a>, there are the details of your device: </b><b><a href=`${formattedPhone.url}`>${formattedPhone.name}</a></b>\n' +
        '\n' +
        '<b>Status:</b> <code>Available. Released 2019, March 08</code>\n' +
        '\n' +
        '<b>Network:</b> <code>GSM / CDMA / HSPA / EVDO / LTE</code>\n' +
        '\n' +
        '<b>OS:</b> <code>Android 9.0 (Pie), upgradable to Android 12, One UI 4.1</code>\n' +
        '\n' +
        '<b>Models:</b> <code>SM-G970F, SM-G970U, SM-G970W, SM-G9700, SM-G970U1, SM-G970N, SM-G970X</code>\n' +
        '\n' +
        '<b>Weight:</b> <code>150 g (5.29 oz)</code>\n' +
        '\n' +
        '<b>3.5mm jack:</b> <code>Yes</code>\n' +
        '\n' +
        '<b>USB:</b> <code>USB Type-C 3.1</code>\n' +
        '\n' +
        '<b>Sensors:</b> <code>Fingerprint (side-mounted), accelerometer, gyro, proximity, compass, barometer</code>\n' +
        '\n' +
        '<b>Battery:</b> <code>Li-Ion 3100 mAh, non-removable</code>\n' +
        '\n' +
        '<b>Charging:</b> <code>15W wired, PD2.0 / 15W wireless (Qi/PMA) / 4.5W reverse wireless</code>\n' +
        '\n' +
        '<b>Display Type:</b> <code>Dynamic AMOLED, HDR10+</code>\n' +
        '\n' +
        '<b>Display Size:</b> <code>5.8 inches, 82.8 cm2 (~83.3% screen-to-body ratio)</code>\n' +
        '\n' +
        '<b>Display Resolution:</b> <code>1080 x 2280 pixels, 19:9 ratio (~438 ppi density)</code>\n' +
        '\n' +
        '<b>Chipset:</b> <code>Exynos 9820 (8 nm) - EMEA/LATAM / Qualcomm SM8150 Snapdragon 855 (7 nm) - USA/China</code>\n' +
        '\n' +
        '<b>CPU:</b> <code>Octa-core (2x2.73 GHz Mongoose M4 & 2x2.31 GHz Cortex-A75 & 4x1.95 GHz Cortex-A55) - EMEA/LATAM / Octa-core (1x2.84 GHz Kryo 485 & 3x2.42 GHz Kryo 485 & 4x1.78 GHz Kryo 485) - USA/China</code>\n' +
        '\n' +
        '<b>GPU:</b> <code>Mali-G76 MP12 - EMEA/LATAM / Adreno 640 - USA/China</code>\n' +
        '\n' +
        '<b>Memory:</b> <code>128GB 6GB RAM, 128GB 8GB RAM, 256GB 8GB RAM</code>\n' +
        '\n' +
        '<b>Device Image</b>: https://fdn2.gsmarena.com/vv/bigpic/samsung-galaxy-s10e.jpg'
    }
  }
}

Please fix this or I will not approve your changes.

You forgot to put the quotation marks ("") before and after the `deviceNURL` value, and after doing that on my side, it returns this (I used a Galaxy S10e search to test it): ``` Unhandled Rejection at: Promise { <rejected> TelegramError: 400: Bad Request: can't parse entities: Unexpected end of name token at byte offset 109 at Telegram.callApi (C:\Users\Admin\Documents\lynx\node_modules\telegraf\lib\core\network\client.js:315:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { response: { ok: false, error_code: 400, description: "Bad Request: can't parse entities: Unexpected end of name token at byte offset 109" }, on: { method: 'editMessageText', payload: [Object] } } } reason: TelegramError: 400: Bad Request: can't parse entities: Unexpected end of name token at byte offset 109 at Telegram.callApi (C:\Users\Admin\Documents\lynx\node_modules\telegraf\lib\core\network\client.js:315:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { response: { ok: false, error_code: 400, description: "Bad Request: can't parse entities: Unexpected end of name token at byte offset 109" }, on: { method: 'editMessageText', payload: { chat_id: -1002168151527, message_id: 80, inline_message_id: undefined, parse_mode: 'HTML', disable_web_page_preview: false, text: '<b><a href="tg://user?id=6723363421">Lucas Gabriel</a>, there are the details of your device: </b><b><a href=`${formattedPhone.url}`>${formattedPhone.name}</a></b>\n' + '\n' + '<b>Status:</b> <code>Available. Released 2019, March 08</code>\n' + '\n' + '<b>Network:</b> <code>GSM / CDMA / HSPA / EVDO / LTE</code>\n' + '\n' + '<b>OS:</b> <code>Android 9.0 (Pie), upgradable to Android 12, One UI 4.1</code>\n' + '\n' + '<b>Models:</b> <code>SM-G970F, SM-G970U, SM-G970W, SM-G9700, SM-G970U1, SM-G970N, SM-G970X</code>\n' + '\n' + '<b>Weight:</b> <code>150 g (5.29 oz)</code>\n' + '\n' + '<b>3.5mm jack:</b> <code>Yes</code>\n' + '\n' + '<b>USB:</b> <code>USB Type-C 3.1</code>\n' + '\n' + '<b>Sensors:</b> <code>Fingerprint (side-mounted), accelerometer, gyro, proximity, compass, barometer</code>\n' + '\n' + '<b>Battery:</b> <code>Li-Ion 3100 mAh, non-removable</code>\n' + '\n' + '<b>Charging:</b> <code>15W wired, PD2.0 / 15W wireless (Qi/PMA) / 4.5W reverse wireless</code>\n' + '\n' + '<b>Display Type:</b> <code>Dynamic AMOLED, HDR10+</code>\n' + '\n' + '<b>Display Size:</b> <code>5.8 inches, 82.8 cm2 (~83.3% screen-to-body ratio)</code>\n' + '\n' + '<b>Display Resolution:</b> <code>1080 x 2280 pixels, 19:9 ratio (~438 ppi density)</code>\n' + '\n' + '<b>Chipset:</b> <code>Exynos 9820 (8 nm) - EMEA/LATAM / Qualcomm SM8150 Snapdragon 855 (7 nm) - USA/China</code>\n' + '\n' + '<b>CPU:</b> <code>Octa-core (2x2.73 GHz Mongoose M4 & 2x2.31 GHz Cortex-A75 & 4x1.95 GHz Cortex-A55) - EMEA/LATAM / Octa-core (1x2.84 GHz Kryo 485 & 3x2.42 GHz Kryo 485 & 4x1.78 GHz Kryo 485) - USA/China</code>\n' + '\n' + '<b>GPU:</b> <code>Mali-G76 MP12 - EMEA/LATAM / Adreno 640 - USA/China</code>\n' + '\n' + '<b>Memory:</b> <code>128GB 6GB RAM, 128GB 8GB RAM, 256GB 8GB RAM</code>\n' + '\n' + '<b>Device Image</b>: https://fdn2.gsmarena.com/vv/bigpic/samsung-galaxy-s10e.jpg' } } } ``` Please fix this or I will not approve your changes.
lucmsilva651 commented 2024-09-08 14:57:52 +00:00 (Migrated from github.com)

As you closed this pull request, I have done it myself. I will gratefully mention you on the commit, as you have done the idea behind it.

As you closed this pull request, I have done it myself. I will gratefully mention you on the commit, as you have done the idea behind it.

Pull request closed

Sign in to join this conversation.
No description provided.