unpinConversation static method

Future<Conversation?> unpinConversation(
  1. String conversationWith,
  2. String conversationType, {
  3. dynamic onSuccess(
    1. Conversation conversation
    )?,
  4. dynamic onError(
    1. CometChatException excep
    )?,
})

Unpin the logged-in user's conversation. Only a pin placed by the logged-in user can be removed — an app_system pin is rejected server-side. Returns the updated Conversation with the pin fields cleared to null. Fires no listener on this device — the user's other devices receive ConversationListener.onConversationUnpinned.

Implementation

static Future<Conversation?> unpinConversation(
  String conversationWith,
  String conversationType, {
  Function(Conversation conversation)? onSuccess,
  Function(CometChatException e)? onError,
}) {
  return _conversationPinFacadeCall(
    conversationWith,
    conversationType,
    'conversation_unpinned',
    (sdk) => sdk.conversations.unpinConversation(
      conversationWith,
      conversationType,
    ),
    onSuccess,
    onError,
  );
}