bot mention fix #18

Merged
kauffj merged 2 commits from mention_fix into master 2019-10-10 22:15:28 +02:00
Showing only changes of commit 3f3bc693a0 - Show all commits

View file

@ -189,7 +189,7 @@ async function doTip(tweet, msg) {
}
const txId = await lbry.sendFrom(id(tweet.user.id_str), tipToAddress, Number(amount), 1);
await T.post("statuses/update", {
status: `@${tweet.user.screen_name} Tipped ${amount} LBC! We'd say who it was to, but then Twitter would ban the bot. \nTransaction: ${txLink(txId)} \nSee https://lbry.io/faq/tipbot-twitter for more information.`,
status: `@${tweet.user.screen_name} Tipped ${amount} LBC! We'd say who it was to, but then Twitter would ban the bot. \nTransaction: ${txLink(txId)} \nSee https://lbry.com/faq/tipbot-twitter for more information.`,
in_reply_to_status_id: tweet.id_str
});
logger.info(
@ -221,7 +221,7 @@ function getValidatedAmount(amount) {
return amount.match(/^[0-9]+(\.[0-9]+)?$/) ? amount : null;
}
function txLink(txId) {
return `https://explorer.lbry.io/tx/${txId}`;
return `https://explorer.lbry.com/tx/${txId}`;
}
function checkTrunc(tweet) {
if (tweet.truncated) return tweet.extended_tweet.full_text;