mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
commit
8bc346e407
7 changed files with 51 additions and 9 deletions
|
@ -220,7 +220,7 @@ class Helpers {
|
|||
$id = (int) last(explode('/', $url));
|
||||
return Status::findOrFail($id);
|
||||
} else {
|
||||
$cached = Status::whereUri($url)->orWhere('url', $url)->first();
|
||||
$cached = Status::whereUri($url)->orWhere('object_url', $url)->first();
|
||||
if($cached) {
|
||||
return $cached;
|
||||
}
|
||||
|
@ -317,6 +317,7 @@ class Helpers {
|
|||
$status->profile_id = $profile->id;
|
||||
$status->url = isset($res['url']) ? $res['url'] : $url;
|
||||
$status->uri = isset($res['url']) ? $res['url'] : $url;
|
||||
$status->object_url = isset($res['id']) ? $res['id'] : $url;
|
||||
$status->caption = strip_tags($res['content']);
|
||||
$status->rendered = Purify::clean($res['content']);
|
||||
$status->created_at = Carbon::parse($ts);
|
||||
|
|
|
@ -326,7 +326,7 @@ class Inbox
|
|||
break;
|
||||
|
||||
case 'Tombstone':
|
||||
$status = Status::whereUri($id)->first();
|
||||
$status = Status::whereUri($id)->orWhere('object_url', $id)->first();
|
||||
if(!$status) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddObjectIdToStatusesTable extends Migration
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('statuses', function (Blueprint $table) {
|
||||
$table->string('object_url')->nullable()->unique()->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('statuses', function (Blueprint $table) {
|
||||
$table->dropColumn('object_url');
|
||||
});
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ return [
|
|||
'profile' => 'プロフィール',
|
||||
'stories' => 'ストーリー',
|
||||
'hashtags' => 'ハッシュダグ',
|
||||
'discover' => '見つける',
|
||||
'discover' => '発見',
|
||||
'directMessages' => 'ダイレクトメッセージ',
|
||||
'timelines' => 'タイムライン',
|
||||
|
||||
|
|
|
@ -6,13 +6,14 @@ return [
|
|||
'home' => 'ホーム',
|
||||
'local' => 'ローカル',
|
||||
'network' => 'ネットワーク',
|
||||
'discover' => '見つける',
|
||||
'discover' => '発見',
|
||||
'viewMyProfile' => '自分のプロフィールを見る',
|
||||
'myProfile' => 'プロフィール',
|
||||
'myTimeline' => 'タイムライン',
|
||||
'publicTimeline' => 'パブリックタイムライン',
|
||||
'remoteFollow' => 'リモートフォロー',
|
||||
'settings' => '設定',
|
||||
'admin' => '管理者',
|
||||
'admin' => '管理者設定',
|
||||
'logout' => 'ログアウト',
|
||||
'directMessages' => 'ダイレクトメッセージ',
|
||||
|
||||
|
|
|
@ -3,11 +3,13 @@ return [
|
|||
'about' => 'このサーバーについて',
|
||||
'help' => 'ヘルプ',
|
||||
'language' => '言語',
|
||||
'fediverse' => '分散',
|
||||
'fediverse' => 'Fediverse',
|
||||
'opensource' => 'オープンソース',
|
||||
'terms' => '規約',
|
||||
'privacy' => 'プライバシー',
|
||||
'terms' => '利用規約',
|
||||
'privacy' => 'プライバシーポリシー',
|
||||
'l10nWip' => '私達はローカライズサポートに取り組んでいます',
|
||||
'currentLocale' => '現在のロケール',
|
||||
'currentLocale' => '現在のロケール(言語)',
|
||||
'selectLocale' => 'リストの中からロケール(言語)を選択してください',
|
||||
'contact' => 'コンタクト',
|
||||
'contact-us' => 'お問い合わせ',
|
||||
];
|
||||
|
|
|
@ -8,6 +8,7 @@ return [
|
|||
'network' => 'Malhum',
|
||||
'discover' => 'Descobrir',
|
||||
'viewMyProfile' => 'Veire mon perfil',
|
||||
'myProfile' => 'Mon perfil',
|
||||
'myTimeline' => 'Ma cronologia',
|
||||
'publicTimeline' => 'Cronologia publica',
|
||||
'remoteFollow' => 'Seguir a distància',
|
||||
|
|
Loading…
Reference in a new issue