| 6036 | | 6036 | |
| 6037 | if (wrongName) { | 6037 | if (wrongName) { |
| 6038 | // If the message starts with the wrong name, delete the entire response | 6038 | // If the message starts with the wrong name, delete the entire response |
| 6039 | let startIndex = getMessage.indexOf(`${wrongName}`); | 6039 | let startIndex = getMessage.indexOf(`${wrongName}:`); |
| 6040 | if (startIndex === 0) { | 6040 | if (startIndex === 0) { |
| 6041 | getMessage = ''; | 6041 | getMessage = ''; |
| 6042 | console.debug(`Message started with the wrong name: "${wrongName}" - response was deleted.`); | 6042 | console.debug(`Message started with the wrong name: "${wrongName}" - response was deleted.`); |