forked from GNUsocial/gnu-social
[DB] Add rendered collumn to note table, so we can preserve microtags from other services
This commit is contained in:
parent
13fb9b4698
commit
5c4be9d29e
@ -45,6 +45,7 @@ class Note extends Entity
|
||||
private int $id;
|
||||
private int $gsactor_id;
|
||||
private ?string $content;
|
||||
private ?string $rendered;
|
||||
private ?int $reply_to;
|
||||
private ?bool $is_local;
|
||||
private ?string $source;
|
||||
@ -87,6 +88,17 @@ class Note extends Entity
|
||||
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
|
||||
{
|
||||
$this->reply_to = $reply_to;
|
||||
@ -214,6 +226,7 @@ class Note extends Entity
|
||||
'id' => ['type' => 'serial', 'not null' => true],
|
||||
'gsactor_id' => ['type' => 'int', 'not null' => true, 'description' => 'who made the note'],
|
||||
'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'],
|
||||
'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"'],
|
||||
|
Loading…
Reference in New Issue
Block a user