fix:update delete message

This commit is contained in:
SL 2024-11-13 10:44:49 +08:00
parent e161253936
commit 479f64bd34

View File

@ -277,6 +277,7 @@ class HttpUtils {
'channel_id': channelId, 'channel_id': channelId,
'channel_type': channelType, 'channel_type': channelType,
'client_msg_no': clientMsgNo, 'client_msg_no': clientMsgNo,
'message_seq': msgSeq,
'message_id': msgId, 'message_id': msgId,
}); });
if (response.statusCode == HttpStatus.ok) { if (response.statusCode == HttpStatus.ok) {
@ -301,7 +302,7 @@ class HttpUtils {
return httpClient; return httpClient;
}; };
try { try {
final response = await dio.delete('$apiURL/message', data: { final response = await dio.post('$apiURL/message/delete', data: {
'login_uid': UserInfo.uid, 'login_uid': UserInfo.uid,
'channel_id': channelId, 'channel_id': channelId,
'channel_type': channelType, 'channel_type': channelType,
@ -350,6 +351,7 @@ class HttpUtils {
extra.readed = extraJson['readed'] ?? 0; extra.readed = extraJson['readed'] ?? 0;
extra.readedCount = extraJson['readed_count'] ?? 0; extra.readedCount = extraJson['readed_count'] ?? 0;
extra.isMutualDeleted = extraJson['is_mutual_deleted'] ?? 0; extra.isMutualDeleted = extraJson['is_mutual_deleted'] ?? 0;
extra.extraVersion = extraJson['extra_version'] ?? 0;
list.add(extra); list.add(extra);
} }
WKIM.shared.messageManager.saveRemoteExtraMsg(list); WKIM.shared.messageManager.saveRemoteExtraMsg(list);