no message

This commit is contained in:
kuaifan 2022-07-01 16:57:03 +08:00
parent 26628b1c89
commit 256143fd21
2 changed files with 31 additions and 1 deletions

View File

@ -533,7 +533,7 @@ class WebSocketDialogMsg extends AbstractModel
$link = 1;
}
if (str_contains($msg['text'], '<img ')) {
$mtype = 'image';
$mtype = str_contains($msg['text'], '"emoticon"') ? 'emoticon' : 'image';
}
} elseif ($type === 'file') {
if (in_array($msg['ext'], ['jpg', 'jpeg', 'png', 'gif'])) {

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class HandleWebSocketDialogMsgsEmoticon extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::table('web_socket_dialog_msgs')->where('mtype', 'image')->where('msg', 'LIKE', '%"emoticon%')->update([
'mtype' => 'emoticon'
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}