Message Interceptor
Interceptor for message send and receive operations.
Register an implementation via ai.nexconn.chatui.config.FeatureConfig to intercept outgoing and incoming messages before the SDK processes them.
All intercept methods return true to consume the event (no further SDK processing) or false to pass it through to the SDK.
Functions
Link copied to clipboard
public abstract boolean interceptOnInsertIncomingMessage(ChannelType type, String targetId, String senderId, MessageReceivedStatusInfo receivedStatus, MessageContent content, long sentTime)
Called before an incoming message is inserted into the local database.
Link copied to clipboard
public abstract boolean interceptOnInsertOutgoingMessage(ChannelType type, String targetId, SentStatus sentStatus, MessageContent content, long sentTime)
Called before an outgoing message is inserted into the local database.
public boolean interceptOnInsertOutgoingMessage(ChannelType type, String targetId, SentStatus sentStatus, MessageContent content, long time, OperationHandler<Message> callback)
Called before an outgoing message is inserted, with an optional result callback.
Link copied to clipboard
Called before a message is sent.
Link copied to clipboard
Called after a message is successfully sent.
Link copied to clipboard
public abstract boolean interceptReceivedMessage(Message message, int left, boolean hasPackage, boolean offline)
Called when a real-time or offline message is received.