please select
  • UIKit
  • SDK
  • Server APIs
Chat/
SDK/
Flutter/
Message/
SDK
  • Install Chat SDK
    • Install
  • Initialize Chat SDK
    • Initialize
  • Login And Logout
    • Login and Logout
  • Message
    • Message Overview
    • Sending Message
    • Receiving Message
    • Historical Message
    • Forwarding Message
    • Modifying Message
    • Message Inserting
    • Deleting Message
    • Clearing Messages
    • Recalling Message
    • Online Message
    • Read Receipt
    • Querying Message
    • Group @ Message
    • Targeted Group Message
    • Notification Muting
    • Message Extension
  • Conversation
    • Conversation Overview
    • Conversation List
    • Getting Conversation
    • Conversation Unread Count
    • Pinning Conversation to the Top
    • Deleting Conversation
    • Conversation Draft
    • Conversation Group
  • Group
    • Group Overview
    • Group Management
    • Group Profile
    • Group Member Management
    • Group Member Profile
    • Custom Group Attribute
  • User
    • User Profile
    • Friend Management
    • Friend List
    • Blocklist
  • Offline Push
    • Offline Push
  • Signaling
    • Signaling Management
  • Local Search
    • Searching for Message
    • Searching for Friend
    • Searching Group
    • Searching for Group Member
  • API Reference
    • Client APIs
  • Guideline for Beginners
  • Console Guide
    • Creating and Upgrading an Application
    • Basic Configuration
    • Feature Configuration
    • Account Management
    • Group Management
    • Webhook Configuration
  • Product Introduction
    • Message Management
      • One-to-One Message
      • Message Storage
      • Offline Push
      • Group Message
      • Message Formats
    • Account System
      • Login Authentication
      • Online Status Management
    • Group Related
      • Group System
      • Group Management
    • User Profile and Relationship Chain
      • Profile Management
      • Relationship Chain Management
  • Purchase Guide
    • Billing Overview
    • Pricing
  • Error Codes

Recalling Message

Feature Description

The method for recalling a message is in the core class TencentImSDKPlugin.v2TIMManager.getMessageManager().
The receiver listens for a message recall notification through addAdvancedMsgListener.

Recalling a Message

The sender can recall a successfully sent message.
By default, the sender can recall a message sent within two minutes. You can change the time limit for message recall as instructed in Feature Configuration.
Message recall can be implemented through the receiver UI code: When a message is recalled, the receiver will receive the onRecvMessageRevoked notification which contains the msgID of the recalled message. You can identify the recalled message at the UI layer based on the msgID and change the bubble for the message to the "Message recalled" status.

Recalling a message (by the sender)

The sender calls revokeMessage (Details) to recall a message.
Sample code:
V2TimCallback revokeMessage = await TencentImSDKPlugin.v2TIMManager.getMessageManager().revokeMessage(msgID: "");

Noticing a message recall (by the receiver)

1. Call addAdvancedMsgListener (Details) to set the advanced message listener.
2. Receive a message recall notification through onRecvMessageRevoked (Details).
Sample code:
onRecvMessageRevoked: (String messageid) {
// Process the recalled message among locally maintained messages
},