diff --git a/mppbridger.js b/mppbridger.js index f0e4f71..949593e 100644 --- a/mppbridger.js +++ b/mppbridger.js @@ -18,7 +18,7 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) { let username = gClient.channel && gClient.channel._id || room; if (username.length > 80) username = username.substr(0,79) + '…'; - webhook.send(options).catch(error => { + webhook.send(Object.assign(options, {username})).catch(error => { handleError(error, `webhook fail in ${channel.id}`); channel.send(options).catch(error => handleError(error, `send fail in ${channel.id} after webhook send fail`)); });