[DB] Add rendered collumn to note table, so we can preserve microtags from other services
This commit is contained in:
parent
460cbbd4c9
commit
7af424b64a
@ -45,6 +45,7 @@ class Note extends Entity
|
|||||||
private int $id;
|
private int $id;
|
||||||
private int $gsactor_id;
|
private int $gsactor_id;
|
||||||
private ?string $content;
|
private ?string $content;
|
||||||
|
private ?string $rendered;
|
||||||
private ?int $reply_to;
|
private ?int $reply_to;
|
||||||
private ?bool $is_local;
|
private ?bool $is_local;
|
||||||
private ?string $source;
|
private ?string $source;
|
||||||
@ -87,6 +88,17 @@ class Note extends Entity
|
|||||||
return $this->content;
|
return $this->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setRendered(?string $rendered): self
|
||||||
|
{
|
||||||
|
$this->rendered = $rendered;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRendered(): ?string
|
||||||
|
{
|
||||||
|
return $this->rendered;
|
||||||
|
}
|
||||||
|
|
||||||
public function setReplyTo(?int $reply_to): self
|
public function setReplyTo(?int $reply_to): self
|
||||||
{
|
{
|
||||||
$this->reply_to = $reply_to;
|
$this->reply_to = $reply_to;
|
||||||
@ -214,6 +226,7 @@ class Note extends Entity
|
|||||||
'id' => ['type' => 'serial', 'not null' => true],
|
'id' => ['type' => 'serial', 'not null' => true],
|
||||||
'gsactor_id' => ['type' => 'int', 'not null' => true, 'description' => 'who made the note'],
|
'gsactor_id' => ['type' => 'int', 'not null' => true, 'description' => 'who made the note'],
|
||||||
'content' => ['type' => 'text', 'description' => 'note content'],
|
'content' => ['type' => 'text', 'description' => 'note content'],
|
||||||
|
'rendered' => ['type' => 'text', 'description' => 'rendered note content if not local, so we can keep the microtags'],
|
||||||
'reply_to' => ['type' => 'int', 'description' => 'note replied to, null if root of a conversation'],
|
'reply_to' => ['type' => 'int', 'description' => 'note replied to, null if root of a conversation'],
|
||||||
'is_local' => ['type' => 'bool', 'description' => 'was this note generated by a local actor'],
|
'is_local' => ['type' => 'bool', 'description' => 'was this note generated by a local actor'],
|
||||||
'source' => ['type' => 'varchar', 'length' => 32, 'description' => 'source of note, like "web", "im", or "clientname"'],
|
'source' => ['type' => 'varchar', 'length' => 32, 'description' => 'source of note, like "web", "im", or "clientname"'],
|
||||||
|
Loading…
Reference in New Issue
Block a user