|
|
@@ -711,17 +711,9 @@ export const useClassroom = ({ user }:{ user : User }) => {
|
|
|
type: 88895, // 使用单一消息类型用于图片
|
|
|
level: NORMAL,
|
|
|
});
|
|
|
+// 发送方不需要手动显示消息,IM系统会自动将消息广播给所有用户(包括发送方自己)
|
|
|
+// 消息接收处理逻辑(第338-360行)会自动处理并显示图片消息
|
|
|
|
|
|
- // 本地显示图片消息(发送方也需要获取文件详情)
|
|
|
- const response = await fileClient[':id']['$get']({ param: { id: fileId.toString() } });
|
|
|
- if (response.status !== 200) {
|
|
|
- throw new Error('获取文件详情失败');
|
|
|
- }
|
|
|
-
|
|
|
- const fileInfo = await response.json();
|
|
|
- // 发送方显示自己的消息,使用当前用户信息
|
|
|
- const senderName = user?.nickname || user?.username || '我';
|
|
|
- showImageMessage(fileInfo.fullUrl, senderName);
|
|
|
|
|
|
} catch (err: any) {
|
|
|
// 检查是否为禁言错误 (错误码442)
|