a little love for matrix: removing full url output from bot response in favor of only 1 url preview being generated by matrix clients.
This commit is contained in:
@@ -45,7 +45,7 @@ export default async bot => {
|
|||||||
|
|
||||||
const link = `${cfg.main.url.full}/${row.id}`.replace('http://', 'https://');
|
const link = `${cfg.main.url.full}/${row.id}`.replace('http://', 'https://');
|
||||||
const msg = [
|
const msg = [
|
||||||
link,
|
e.type === 'matrix' ? `ID: ${row.id}` : link,
|
||||||
ratingStr,
|
ratingStr,
|
||||||
`user: ${row.username}`,
|
`user: ${row.username}`,
|
||||||
`~${lib.formatSize(row.size)}`,
|
`~${lib.formatSize(row.size)}`,
|
||||||
@@ -57,7 +57,7 @@ export default async bot => {
|
|||||||
const color = rating === 'sfw' ? '#00ff00' : (rating === 'nsfw' ? '#ff0000' : '#888888');
|
const color = rating === 'sfw' ? '#00ff00' : (rating === 'nsfw' ? '#ff0000' : '#888888');
|
||||||
const formattedRating = `<font color="${color}"><b>${rating}</b></font>`;
|
const formattedRating = `<font color="${color}"><b>${rating}</b></font>`;
|
||||||
const formattedMsg = [
|
const formattedMsg = [
|
||||||
link,
|
e.type === 'matrix' ? `ID: ${row.id}` : link,
|
||||||
formattedRating,
|
formattedRating,
|
||||||
`user: ${row.username}`,
|
`user: ${row.username}`,
|
||||||
`~${lib.formatSize(row.size)}`,
|
`~${lib.formatSize(row.size)}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user