[TwitterBridge] Do not fail on missing notice

This commit is contained in:
Alexei Sorokin 2020-08-07 11:42:21 +03:00 committed by Diogo Peralta Cordeiro
parent abacbf3e0a
commit 5196b45e62

View File

@ -502,6 +502,10 @@ class TwitterBridgePlugin extends Plugin
if ($action instanceof ShowNoticeAction) { if ($action instanceof ShowNoticeAction) {
$notice = Notice::getKV('id', $action->arg('notice')); $notice = Notice::getKV('id', $action->arg('notice'));
if (is_null($notice)) {
return true;
}
try { try {
$flink = Foreign_link::getByUserID($notice->profile_id, TWITTER_SERVICE); $flink = Foreign_link::getByUserID($notice->profile_id, TWITTER_SERVICE);
$fuser = Foreign_user::getForeignUser($flink->foreign_id, TWITTER_SERVICE); $fuser = Foreign_user::getForeignUser($flink->foreign_id, TWITTER_SERVICE);