Switchout DB to CockroachDB

This commit is contained in:
Deon George
2022-01-01 16:59:35 +11:00
parent afaa7d8bc7
commit 424d6ef39d
28 changed files with 1342 additions and 865 deletions

View File

@@ -93,7 +93,7 @@ class Message extends FTNBase
private string $subject; // Message subject
private string $msgid; // MSG ID
private string $reply; // Reply ID
private string $replyid; // Reply ID
private string $echoarea; // FTS-0004.001
private string $intl; // Netmail details
@@ -182,7 +182,7 @@ class Message extends FTNBase
$this->message = '';
$this->msgid = '';
$this->reply = '';
$this->replyid = '';
$this->echoarea = '';
$this->intl = '';
@@ -372,7 +372,7 @@ class Message extends FTNBase
case 'echoarea':
case 'msgid':
case 'reply':
case 'replyid':
case 'message':
case 'message_src':
@@ -412,7 +412,7 @@ class Message extends FTNBase
case 'subject':
case 'msgid':
case 'reply':
case 'replyid':
case 'echoarea':
case 'intl':
@@ -486,8 +486,8 @@ class Message extends FTNBase
// Add some kludges
$return .= sprintf("\01MSGID: %s\r",$this->msgid);
if ($this->reply)
$return .= sprintf("\01REPLY: %s\r",$this->reply);
if ($this->replyid)
$return .= sprintf("\01REPLY: %s\r",$this->replyid);
foreach ($this->_kludge as $k=>$v) {
if ($x=$this->kludge->get($k))

View File

@@ -26,6 +26,7 @@ final class Test extends Process
private const testing = ['test','testing'];
// @todo add path and other kludges
public static function handle(Message $msg): bool
{
if ((strtolower($msg->user_to) !== 'all') || ! in_array(strtolower($msg->subject),self::testing))
@@ -66,7 +67,7 @@ final class Test extends Process
$o->datetime = Carbon::now();
$o->tzoffset = $o->datetime->utcOffset();
$o->echoarea_id = $eo?->id;
$o->reply = $msg->msgid;
$o->replyid = $msg->msgid;
$o->fftn_id = $ftns->id;
$o->flags = Message::FLAG_LOCAL;

View File

@@ -50,7 +50,7 @@ final class Ping extends Process
$o->datetime = Carbon::now();
$o->tzoffset = $o->datetime->utcOffset();
$o->reply = $msg->msgid;
$o->replyid = $msg->msgid;
$o->fftn_id = $ftns->id;
$o->tftn_id = ($x=$msg->fftn_o) ? $x->id : NULL;
$o->flags = Message::FLAG_LOCAL;