BINKP responding to incoming netmail pings
This commit is contained in:
@@ -12,8 +12,20 @@ class Netmail extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'mongodb';
|
||||
protected $dates = ['datetime'];
|
||||
//protected $connection = 'mongodb';
|
||||
protected $dates = ['datetime','sent_at'];
|
||||
|
||||
/**
|
||||
* Resolve a connection instance.
|
||||
* We need to do this, because our relations are in pgsql and somehow loading a relation changes this models
|
||||
* connection information. Using protected $connection is not enough.
|
||||
*
|
||||
* @param string|null $connection
|
||||
*/
|
||||
public static function resolveConnection($connection = null)
|
||||
{
|
||||
return static::$resolver->connection('mongodb');
|
||||
}
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
@@ -69,6 +81,10 @@ class Netmail extends Model
|
||||
$o->user_from = $this->from;
|
||||
$o->subject = $this->subject;
|
||||
$o->message = $this->msg;
|
||||
if ($this->tagline)
|
||||
$o->message .= "\r... ".$this->tagline."\r";
|
||||
|
||||
$o->tearline .= $this->tearline;
|
||||
|
||||
$o->msgid = sprintf('%s %08x',$this->fftn->ftn3d,crc32($this->id));
|
||||
|
||||
|
Reference in New Issue
Block a user