- Android
- iOS
- JavaScript
- Flutter
- ReactNative
Pinned-message callbacks are included in the message listener.
JIM.getInstance().getMessageManager().addListener("main", new IMessageManager.IMessageListener() {
/// callback triggered when a message is pinned or unpinned
/// message: corresponding message
/// operator: user who performed the pin operation
/// isTop: true false indicates unpinning
void onMessageSetTop(Message message, UserInfo operator, boolean isTop) {
}
});
Pinned-message callbacks are included in the message listener.
[JIM.shared.messageManager addDelegate:self];
/// callback triggered when a message is pinned or unpinned
/// - Parameters:
/// - isTop: YES pins the message; NO unpins it
/// - message: corresponding message
/// - userInfo: user who performed the pin operation
- (void)messageDidSetTop:(BOOL)isTop
message:(JMessage *)message
user:(JUserInfo *)userInfo {
}
Pinned-message callback. It is triggered when a message is pinned in a conversation, whether by the current user or another user. Handle pinned-message UI logic in this listener.

let { Event } = JIM;
jim.on(Event.MESSAGE_SET_TOP, ({ message, isTop, operator, createdTime }) => {
// message => original message that was pinned or unpinned; see the Message object for details
// isTop => whether the message is pinned
// operator => operator { id: '', name: '', portrait: '' }
// createdTime => operation time
});
Pinned-message callbacks are included in the message listener.
/// callback triggered when a message is pinned or unpinned
/// message: corresponding message
/// operator: user who performed the pin operation
/// isTop: true false indicates unpinning
JuggleIm.instance.onMessageSetTop = (message, operator, isTop) {
};