temp fix for pleroma urls
This commit is contained in:
parent
344cf309d6
commit
1ee60d9dd3
@ -31,7 +31,7 @@
|
||||
},
|
||||
{
|
||||
"name": "url-fediverse",
|
||||
"version": "1.0.0"
|
||||
"version": "1.0.1"
|
||||
},
|
||||
{
|
||||
"name": "url-peertube",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"main": "plugin.js",
|
||||
"name": "url-fediverse",
|
||||
"description": "URLReply Fediverse",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"tags": ["urlreply"],
|
||||
"dependencies": ["urlreply"],
|
||||
"npmDependencies": []
|
||||
|
@ -24,7 +24,7 @@ async function mastodonResponse(msg: IMessage, url: string, type = 'Mastodon'):
|
||||
try {
|
||||
data = await httpGET(url2go);
|
||||
if (!data) {
|
||||
throw new Error('No API response, probably not ' + type + ' after all.')
|
||||
throw new Error('No API response, probably not ' + type + ' after all.');
|
||||
}
|
||||
data = JSON.parse(data);
|
||||
} catch (e) {
|
||||
@ -72,7 +72,7 @@ class FediResponsePlugin extends Plugin {
|
||||
addUrlReply(urlreply: any): void {
|
||||
urlreply.registerHandler(this.name, 'html/mastodon',
|
||||
async (url: string, msg: IMessage, title: string, body: any): Promise<boolean> => {
|
||||
const type = title === 'Pleroma' ? 'Pleroma' : 'Mastodon';
|
||||
const type = url.match('/notice/') ? 'Pleroma' : 'Mastodon';
|
||||
let pass = false;
|
||||
|
||||
if (type === 'Pleroma') {
|
||||
|
Loading…
Reference in New Issue
Block a user