Explorar o código

Merge pull request #925 from pixelfed/frontend-ui-refactor

Frontend ui refactor
daniel %!s(int64=6) %!d(string=hai) anos
pai
achega
c2d7fa3c6a
Modificáronse 2 ficheiros con 15 adicións e 2 borrados
  1. 5 1
      app/Jobs/StatusPipeline/StatusEntityLexer.php
  2. 10 1
      app/StatusHashtag.php

+ 5 - 1
app/Jobs/StatusPipeline/StatusEntityLexer.php

@@ -95,7 +95,11 @@ class StatusEntityLexer implements ShouldQueue
                     ['name' => $tag, 'slug' => $slug]
                 );
                 StatusHashtag::firstOrCreate(
-                    ['status_id' => $status->id, 'hashtag_id' => $hashtag->id]
+                    [
+                        'status_id' => $status->id, 
+                        'hashtag_id' => $hashtag->id,
+                        'profile_id' => $status->profile_id
+                    ]
                 );
             });
         }

+ 10 - 1
app/StatusHashtag.php

@@ -6,7 +6,11 @@ use Illuminate\Database\Eloquent\Model;
 
 class StatusHashtag extends Model
 {
-    public $fillable = ['status_id', 'hashtag_id'];
+    public $fillable = [
+    	'status_id', 
+    	'hashtag_id', 
+    	'profile_id'
+    ];
 
 	public function status()
 	{
@@ -17,4 +21,9 @@ class StatusHashtag extends Model
 	{
 		return $this->belongsTo(Hashtag::class);
 	}
+
+	public function profile()
+	{
+		return $this->belongsTo(Profile::class);
+	}
 }