• UIKit
  • SDK
  • 서버 API
Chat/
SDK/
Unity(Game Solution)/
메시지/
SDK
  • Overview
    • Product Features
    • Pricing
      • Billing Overview
      • Chat Monthly Package
      • Billing of Chat Out-of-Package Usage
  • Run Demo
  • Getting Started
    • SDK 통합
    • 초기화
    • 로그인 및 로그아웃
  • 메시지
    • 메시지 개요
    • 메시지 보내기
    • 메시지 받기
    • 과거 메시지
    • 메시지 전달
    • 메시지 수정
    • 메시지 삭제
    • 메시지 비우기
    • 메시지 철회
    • 온라인 메시지
    • 읽음 확인
    • 메시지 조회
    • 그룹 @ 메시지
    • 지향적 그룹 메시지
    • 알림 음소거
    • 메시지 확장
  • 대화
    • 대화 개요
    • 대화 목록
    • 대화 획득
    • 읽지 않은 대화 수
    • 대화 최상단 고정
    • 대화 삭제
    • 대화 초안
    • 대화 마크
    • 대화 그룹
  • 그룹
    • 그룹 개요
    • 그룹 관리
    • 그룹 정보
    • 그룹 멤버 관리
    • 그룹 멤버 정보
    • 그룹 속성 사용자 정의
    • 그룹 카운터
  • 사용자
    • 사용자 정보
    • 사용자 상태
    • 친구 관리
    • 친구 목록
    • 블록리스트
  • Changelog
  • 콘솔 안내
    • New Console Introduction
    • 애플리케이션 생성 및 업그레이드
    • 기본 구성
    • 기능 구성
    • 계정 관리
    • 그룹 관리
    • 콜백 구성
    • Usage Statistics
    • Real-Time Monitor
    • Auxiliary Development Tools
  • 제품 소개
    • 메시지 관리
      • 1대1 메시지
      • 메시지 저장
      • 오프라인 푸시
      • 그룹 메시지
      • 메시지 포맷
    • 계정 시스템
      • 로그인 인증
      • 온라인 상태 관리
    • 그룹 관련
      • 그룹 시스템
      • 그룹 관리
    • 사용자 정보 및 관계망
      • 정보 관리
      • 관계망 관리
  • Scenario-based Practice
    • AI Chatbot
    • Super Large Entertainment and Collaboration Community
    • Discord Implementation Guide
  • Push Service
    • Overview
    • Activate the Service
    • Quick Start
    • Manufacturer Channel
      • Manufacturer Configuration
        • Android
        • iOS
        • Flutter
        • React-Native
      • Quick Integration
        • Android
        • iOS
        • Flutter
        • React-Native
    • Statistics
    • Troubleshooting Tool
    • Client APIs
      • Android
      • iOS
      • Flutter
      • React Native
    • REST API
      • Pushing to All/Tagged Users
      • UserID-Targeted Push
      • Obtaining Application Attribute Names
      • Setting Application Attribute Names
      • Obtaining User Attributes
      • Setting User Attributes
      • Deleting User Attributes
      • Obtaining User Tags
      • Adding User Tags
      • Deleting User Tags
      • Deleting All User Tags
      • Recalling Push
    • Push Callback
      • All Users / Tags / UserID Push Callback
      • Other Push Callbacks
    • Advanced Features
      • Custom Definition Badge
      • Custom Definition Ringtone
      • Customized Icon
      • Custom Definition Click Redirect
      • Push Message Categorization
    • Release Notes
      • Android
      • iOS
      • Flutter
      • React Native
    • FAQS
  • 에러코드
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

메시지 삭제

Feature Description

Both local messages and cloud messages can be deleted. When cloud messages are deleted, such messages will be deleted both locally and from the cloud and cannot be recovered.
If the last message is deleted, the lastMessage in the conversation will become the last but one message.

Deleting a local message

Call MsgDelete (Details) to delete a local message.
Note:
1. After a historical local message is deleted, the message will be marked as deleted locally by the SDK and can no longer be pulled through MsgGetMsgList.
2. If the application is uninstalled and reinstalled, the deletion marker will be lost locally, and the message can still be pulled through MsgGetMsgList.
Sample code:
public static void MsgDelete()
{
string conv_id = "287646";

MsgDeleteParam message_delete_param = new MsgDeleteParam();
message_delete_param.msg_delete_param_msg = new Message(); // The message to be deleted
message_delete_param.msg_delete_param_is_remble = false; // Delete the local message
TIMResult res = TencentIMSDK.MsgDelete(conv_id, TIMConvType.kTIMConv_C2C, message_delete_param, (int code, string desc, string user_data) => {
// Process the callback logic
});
}

Deleting a message from the cloud

Call MsgDelete (Details) to delete messages from the cloud.
This API deletes messages both locally and from the cloud, which cannot be recovered.
Note:
1. Up to 30 messages can be deleted per call.
2. Messages to be deleted per call must be from the same conversation.
3. This API can be called only once per second.
4. If messages have been pulled on a device by an account, they will remain on the device after the API is called to delete them from the cloud; in other words, deleted messages are not synced.
Sample code:
public static void MsgDelete()
{
string conv_id = "287646";

MsgDeleteParam message_delete_param = new MsgDeleteParam();
message_delete_param.msg_delete_param_msg = new Message(); // The message to be deleted
message_delete_param.msg_delete_param_is_remble = true; // Delete the roaming message
TIMResult res = TencentIMSDK.MsgDelete(conv_id, TIMConvType.kTIMConv_C2C, message_delete_param, (int code, string desc, string user_data) => {
// Process the callback logic
});
}
커뮤니티에 질문하십시오!
기술적인 논의를 시작하고 즉시 전문가 지원을 받으세요!