|
@@ -506,6 +506,11 @@ export const useClassroom = ({ user }:{ user : User }) => {
|
|
|
const sendMessage = async (): Promise<void> => {
|
|
const sendMessage = async (): Promise<void> => {
|
|
|
if (!imMessageManager.current || !classId) return;
|
|
if (!imMessageManager.current || !classId) return;
|
|
|
|
|
|
|
|
|
|
+ if (!msgText.trim()) {
|
|
|
|
|
+ showToast('error', '消息不能为空');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
await imMessageManager.current.sendGroupMessage({
|
|
await imMessageManager.current.sendGroupMessage({
|
|
|
groupId: classId,
|
|
groupId: classId,
|