Compare commits
No commits in common. "60940cbdedbfd33a4b975a2080f43220cde63d41" and "61dfadba5ad8430797ec64c9d30884ca87179a1f" have entirely different histories.
60940cbded
...
61dfadba5a
@ -81,7 +81,7 @@ class MessageProcess implements ShouldQueue
|
|||||||
Log::debug(sprintf('%s:- Checking for duplicate from host [%s].',self::LOGKEY,$this->mo->fftn->ftn));
|
Log::debug(sprintf('%s:- Checking for duplicate from host [%s].',self::LOGKEY,$this->mo->fftn->ftn));
|
||||||
|
|
||||||
$o = Netmail::where('msgid',$this->mo->msgid)
|
$o = Netmail::where('msgid',$this->mo->msgid)
|
||||||
->where('fftn_id',$this->mo->fftn_id)
|
->where('fftn_id',$this->mo->fftn->id)
|
||||||
->where('datetime','>',Carbon::now()->subYears(3))
|
->where('datetime','>',Carbon::now()->subYears(3))
|
||||||
->single();
|
->single();
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ class MessageProcess implements ShouldQueue
|
|||||||
// The packet sender
|
// The packet sender
|
||||||
$sender = $this->mo->set->get('set_sender');
|
$sender = $this->mo->set->get('set_sender');
|
||||||
|
|
||||||
// @todo Check that this does evaluate to true if a message has been rescanned
|
// @todo Check that this does evaulate to true if a message has been rescanned
|
||||||
$rescanned = $this->mo->kludges->get('RESCANNED',FALSE);
|
$rescanned = $this->mo->kludges->get('RESCANNED',FALSE);
|
||||||
|
|
||||||
// Echoarea doesnt exist, cant import the message
|
// Echoarea doesnt exist, cant import the message
|
||||||
@ -226,34 +226,57 @@ class MessageProcess implements ShouldQueue
|
|||||||
// Check for duplicate messages
|
// Check for duplicate messages
|
||||||
// FTS-0009.001
|
// FTS-0009.001
|
||||||
if ($this->mo->msgid) {
|
if ($this->mo->msgid) {
|
||||||
$o = ($x=Echomail::where('msgid',$this->mo->msgid)
|
$o = Echomail::where('msgid',$this->mo->msgid)
|
||||||
->where('fftn_id',$this->mo->fftn_id)
|
->where('fftn_id',$this->mo->fftn->id)
|
||||||
->where('datetime','>=',$this->mo->datetime->clone()->subYears(3))
|
->where('datetime','>=',$this->mo->date->clone()->subYears(3))
|
||||||
->where('datetime','<=',$this->mo->datetime)
|
->where('datetime','<=',$this->mo->date)
|
||||||
->dontCache())
|
->dontCache()
|
||||||
->single();
|
->single();
|
||||||
|
|
||||||
Log::debug(sprintf('%s:- Checking for duplicate from host id [%d], with msgid [%s] between [%s] and [%s].',
|
Log::debug(sprintf('%s:- Checking for duplicate from host id [%d].',self::LOGKEY,$this->mo->fftn->id));
|
||||||
self::LOGKEY,
|
|
||||||
$this->mo->fftn_id,
|
|
||||||
$this->mo->msgid,
|
|
||||||
$this->mo->datetime->clone()->subYears(3),
|
|
||||||
$this->mo->datetime,
|
|
||||||
));
|
|
||||||
|
|
||||||
if ($x->count()) {
|
if ($o) {
|
||||||
// @todo Actually update seenby
|
// @todo Actually update seenby
|
||||||
Log::alert(sprintf('%s:! Duplicate echomail (%s) in [%s] from (%s) [%s] to (%s) - ignoring.',
|
Log::alert(sprintf('%s:! Duplicate echomail [%d] (%s) in [%s] from (%s) [%s] to (%s) - updating seenby.',
|
||||||
self::LOGKEY,
|
self::LOGKEY,
|
||||||
|
$o->id,
|
||||||
$this->mo->msgid,
|
$this->mo->msgid,
|
||||||
$this->mo->echoarea->name,
|
$this->mo->echoarea->name,
|
||||||
$this->mo->from,$this->mo->fftn->ftn,
|
$this->mo->from,$this->mo->fftn->ftn,
|
||||||
$this->mo->to,
|
$this->mo->to,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
//$o->save();
|
||||||
|
|
||||||
// @todo This duplicate message may have gone via a different path, be nice to record it.
|
// @todo This duplicate message may have gone via a different path, be nice to record it.
|
||||||
|
|
||||||
|
/*
|
||||||
|
// If we didnt get the path on the original message, we'll override it
|
||||||
|
if (! $o->path->count()) {
|
||||||
|
$dummy = collect();
|
||||||
|
$path = $this->parseAddresses('path',$this->mo->path,$sender->zone,$dummy);
|
||||||
|
|
||||||
|
$ppoid = NULL;
|
||||||
|
foreach ($path as $aoid) {
|
||||||
|
$po = DB::select('INSERT INTO echomail_path (echomail_id,address_id,parent_id) VALUES (?,?,?) RETURNING id',[
|
||||||
|
$o->id,
|
||||||
|
$aoid,
|
||||||
|
$ppoid,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$ppoid = $po[0]->id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// @todo if we have an export for any of the seenby addresses, remove it
|
// @todo if we have an export for any of the seenby addresses, remove it
|
||||||
|
|
||||||
|
//$seenby = $this->parseAddresses('seenby',$this->mo->seenby,$sender->zone,$o->rogue_seenby);
|
||||||
|
//$this->mo->seenby()->syncWithoutDetaching($seenby);
|
||||||
|
|
||||||
|
// In case our rogue_seenby changed
|
||||||
|
//$this->mo->save();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -261,7 +284,7 @@ class MessageProcess implements ShouldQueue
|
|||||||
// Find another message with the same msg_crc
|
// Find another message with the same msg_crc
|
||||||
if ($this->mo->msg_crc) {
|
if ($this->mo->msg_crc) {
|
||||||
$o = Echomail::where('msg_crc',$xx=md5($this->mo->msg_crc))
|
$o = Echomail::where('msg_crc',$xx=md5($this->mo->msg_crc))
|
||||||
->where('fftn_id',$this->mo->fftn_id)
|
->where('fftn_id',$this->mo->fftn->id)
|
||||||
->where('datetime','>',Carbon::now()->subWeek())
|
->where('datetime','>',Carbon::now()->subWeek())
|
||||||
->dontCache()
|
->dontCache()
|
||||||
->get();
|
->get();
|
||||||
|
@ -63,7 +63,7 @@ class Echomail extends Matrix
|
|||||||
->withQueryParameters(['user_id'=>$user])
|
->withQueryParameters(['user_id'=>$user])
|
||||||
->post(sprintf('https://%s/_matrix/client/v3/rooms/%s/send/m.room.message',config('matrix.server'),$room),[
|
->post(sprintf('https://%s/_matrix/client/v3/rooms/%s/send/m.room.message',config('matrix.server'),$room),[
|
||||||
'msgtype'=>'m.text',
|
'msgtype'=>'m.text',
|
||||||
'body'=>sprintf("```\n%s\n```",mb_convert_encoding(str_replace("\r","\n",$this->o->msg),'UTF-8','IBM850')),
|
'body'=>mb_convert_encoding(str_replace("\r","\n",$this->o->msg),'UTF-8','IBM850'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
switch ($msg->status()) {
|
switch ($msg->status()) {
|
||||||
|
@ -194,6 +194,6 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
'same_site' => null,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
||||||
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
|
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
|
||||||
|
|
||||||
<link type="text/css" rel="stylesheet" href="{{ url('oldschool/css/main.css') }}" media="screen">
|
<link type="text/css" rel="stylesheet" href="{{ asset('oldschool/css/main.css') }}" media="screen">
|
||||||
|
|
||||||
@yield('page-css')
|
@yield('page-css')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user