Skip to content

Commit

Permalink
Renote target がnullのときはスキップする
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Apr 27, 2019
1 parent 1de5f5f commit 9834267
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/remote/activitypub/kernel/announce/note.ts
Expand Up @@ -43,13 +43,19 @@ export default async function(resolver: Resolver, actor: IRemoteUser, activity:
} catch (e) {
// 対象が4xxならスキップ
if (e.statusCode >= 400 && e.statusCode < 500) {
logger.warn(`Ignored announce target ${note.inReplyTo} - ${e.statusCode}`);
logger.warn(`Ignored announce target ${note.id || note} - ${e.statusCode}`);
return;
}
logger.warn(`Error in announce target ${note.inReplyTo} - ${e.statusCode || e}`);
logger.warn(`Error in announce target ${note.id || note} - ${e.statusCode || e}`);
throw e;
}

// skip unavailable
if (renote == null) {
logger.warn(`announce target is null ${note.id || note}`);
return;
}

logger.info(`Creating the (Re)Note: ${uri}`);

//#region Visibility
Expand Down

0 comments on commit 9834267

Please sign in to comment.