diff --git a/lib/pages/whisper_detail/controller.dart b/lib/pages/whisper_detail/controller.dart index 695e3b81..2276d0cf 100644 --- a/lib/pages/whisper_detail/controller.dart +++ b/lib/pages/whisper_detail/controller.dart @@ -93,11 +93,8 @@ class WhisperDetailController extends GetxController { var result = await MsgHttp.sendMsg( senderUid: ownerMid, receiverId: int.parse(mid!), - content: msgType == 5 - ? message - : picMsg != null - ? jsonEncode(picMsg) - : '{"content":"$message"}', + content: + msgType == 5 ? message : jsonEncode(picMsg ?? {"content": message}), msgType: msgType ?? (picMsg != null ? 2 : 1), ); SmartDialog.dismiss();