unpinConversation static method
Future<Conversation?>
unpinConversation(
- String conversationWith,
- String conversationType, {
- dynamic onSuccess(
- Conversation conversation
- dynamic onError(
- 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. This device fires
ConversationListener.onConversationUnpinned once for its own call,
before onSuccess, as do the user's other devices. 5.1.0 keeps the
5.0.9 same-device callback for UI Kit compatibility; see BEH-FLAG-04.
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,
);
}