public function __construct($text, $tags = []) {
$this->text = trim($text);
$this->tags = $tags;
+ if (isset($tags['reply-parent-display-name'])) {
+ $this->text = mb_substr($text, mb_strlen($tags['reply-parent-display-name']) + 2);
+ }
$this->raw = strtolower(preg_replace('/[^\w]/u', '', $this->text));
$this->tokens = array_values(array_map('trim', array_filter(preg_split('/\b/u', strtolower($this->text)))));
- $this->emoteless = $this->text;
+ $this->emoteless = $text;
if (isset($this->tags['emotes']) && !empty($this->tags['emotes'])) {
$emotes = explode('/', $this->tags['emotes']);
foreach ($emotes as $emote) {
if ($this->contains(['€', '$', '@', '://'])) {
return true;
}
- if ($this->containsRaw(['followers', 'promotion', 'viewers'])) {
+ if ($this->containsRaw(['follow', 'promotion', 'viewer'])) {
return true;
}
if ($this->containsRaw('horsti')) {