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. 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,
);
}