attachment count
This commit is contained in:
parent
1ee60d9dd3
commit
8cce75646a
@ -31,7 +31,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "url-fediverse",
|
"name": "url-fediverse",
|
||||||
"version": "1.0.1"
|
"version": "1.0.2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "url-peertube",
|
"name": "url-peertube",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"main": "plugin.js",
|
"main": "plugin.js",
|
||||||
"name": "url-fediverse",
|
"name": "url-fediverse",
|
||||||
"description": "URLReply Fediverse",
|
"description": "URLReply Fediverse",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"tags": ["urlreply"],
|
"tags": ["urlreply"],
|
||||||
"dependencies": ["urlreply"],
|
"dependencies": ["urlreply"],
|
||||||
"npmDependencies": []
|
"npmDependencies": []
|
||||||
|
@ -56,6 +56,11 @@ async function mastodonResponse(msg: IMessage, url: string, type = 'Mastodon'):
|
|||||||
keys.push(['bold', '@' + data.account.acct + ':']);
|
keys.push(['bold', '@' + data.account.acct + ':']);
|
||||||
keys.push(['field', end, { type: 'content' }]);
|
keys.push(['field', end, { type: 'content' }]);
|
||||||
|
|
||||||
|
if (data.media_attachments?.length) {
|
||||||
|
const amount = data.media_attachments.length;
|
||||||
|
keys.push(['field', `[${amount} attachment${amount !== 1 ? 's' : ''}]`, { color: 'brown' }]);
|
||||||
|
}
|
||||||
|
|
||||||
msg.resolve(keys);
|
msg.resolve(keys);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user