<commit_before><?php

namespace App;

use Movim\Model;
use Movim\Picture;

class Message extends Model
{
    protected $primaryKey = ['user_id', 'jidfrom', 'id'];
    public $incrementing = false;

    protected $guarded = [];

    protected $attributes = [
        'type'    => 'chat'
    ];

    public function save(array $options = [])
    {
        try {
            parent::save($options);
        } catch (\Exception $e) {
            // Race condition
        }
    }

    public function user()
    {
        return $this->belongsTo('App\User');
    }

    public function setFileAttribute(array $file)
    {
        $this->attributes['file'] = serialize($file);
    }

    public function getFileAttribute()
    {
        if (isset($this->attributes['file'])) {<commit_msg>Fix all messages being marked as edited and quoted on SQLite<commit_after><?php

namespace App;

use Movim\Model;
use Movim\Picture;

class Message extends Model
{
    protected $primaryKey = ['user_id', 'jidfrom', 'id'];
    public $incrementing = false;

    protected $guarded = [];

    protected $attributes = [
        'type'    => 'chat'
    ];

    protected $casts = [
        'edited'   => 'boolean',
        'quoted'   => 'boolean',
        'markable' => 'boolean'
    ];

    public function save(array $options = [])
    {
        try {
            parent::save($options);
        } catch (\Exception $e) {
            // Race condition
        }
    }

    public function user()
    {
        return $this->belongsTo('App\User');
    }

    public function setFileAttribute(array $file)
    {
        $this->attributes['file'] = serialize($file);
    }

    public function getFileAttribute()
    {
        if (isset($this->attributes['file'])) {
{'fraction_non_alphanumeric': 0.14277522935779816, 'fraction_numerical': 0.0, 'mean_word_length': 2.207720588235294, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3548391', 'n_tokens_mistral': 522, 'n_tokens_neox': 506, 'n_words': 122}