attachment count
This commit is contained in:
parent
1ee60d9dd3
commit
8cce75646a
@ -31,7 +31,7 @@
|
||||
},
|
||||
{
|
||||
"name": "url-fediverse",
|
||||
"version": "1.0.1"
|
||||
"version": "1.0.2"
|
||||
},
|
||||
{
|
||||
"name": "url-peertube",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"main": "plugin.js",
|
||||
"name": "url-fediverse",
|
||||
"description": "URLReply Fediverse",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"tags": ["urlreply"],
|
||||
"dependencies": ["urlreply"],
|
||||
"npmDependencies": []
|
||||
|
@ -56,6 +56,11 @@ async function mastodonResponse(msg: IMessage, url: string, type = 'Mastodon'):
|
||||
keys.push(['bold', '@' + data.account.acct + ':']);
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user