This commit is contained in:
Niko Storni 2019-10-10 22:15:07 +02:00
parent 804c7aed91
commit 3f3bc693a0

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); const txId = await lbry.sendFrom(id(tweet.user.id_str), tipToAddress, Number(amount), 1);
await T.post("statuses/update", { 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 in_reply_to_status_id: tweet.id_str
}); });
logger.info( logger.info(
@ -221,7 +221,7 @@ function getValidatedAmount(amount) {
return amount.match(/^[0-9]+(\.[0-9]+)?$/) ? amount : null; return amount.match(/^[0-9]+(\.[0-9]+)?$/) ? amount : null;
} }
function txLink(txId) { function txLink(txId) {
return `https://explorer.lbry.io/tx/${txId}`; return `https://explorer.lbry.com/tx/${txId}`;
} }
function checkTrunc(tweet) { function checkTrunc(tweet) {
if (tweet.truncated) return tweet.extended_tweet.full_text; if (tweet.truncated) return tweet.extended_tweet.full_text;