feat: 支持发送录音

This commit is contained in:
kuaifan
2022-05-27 14:48:17 +08:00
parent 4dd8658aff
commit 44ff21ffcd
30 changed files with 1766 additions and 304 deletions

View File

@@ -92,6 +92,8 @@ class WebSocketDialogMsg extends AbstractModel
$value['type'] = in_array($value['ext'], ['jpg', 'jpeg', 'png', 'gif']) ? 'img' : 'file';
$value['path'] = Base::fillUrl($value['path']);
$value['thumb'] = Base::fillUrl($value['thumb'] ?: Base::extIcon($value['ext']));
} else if ($this->type === 'record') {
$value['path'] = Base::fillUrl($value['path']);
}
return $value;
}
@@ -210,6 +212,8 @@ class WebSocketDialogMsg extends AbstractModel
switch ($this->type) {
case 'text':
return $this->previewTextMsg($this->msg['text'], $preserveHtml);
case 'record':
return "[语音]";
case 'file':
if ($this->msg['type'] == 'img') {
return "[图片]";