Class EditMessageHandler

  • All Implemented Interfaces:

    
    public class EditMessageHandler
    extends MultiDataHandler
                        

    Data handler for message editing operations.

    Observes message-modification events from the SDK, processes edited messages and their associated reference messages, and exposes data keys for observers to consume.

    Since:

    5.26.0

    • Constructor Detail

      • EditMessageHandler

        EditMessageHandler()
    • Method Detail

      • stop

         void stop()

        Stops the handler.

      • processMessageEditStatusAndReferMsgStatus

         List<UiMessage> processMessageEditStatusAndReferMsgStatus(List<Message> editMessageList, List<UiMessage> uiMessageList)

        Processes the edit status of messages and updates any reference messages that quote them.

        Parameters:
        editMessageList - list of edited messages
        uiMessageList - the current UI message list
        Returns:

        updated UI message list for refreshing the screen

      • processMessageReferMsgStatus

         List<UiMessage> processMessageReferMsgStatus(Message message, ReferenceMessageStatus status, List<UiMessage> uiMessageList)

        Updates the reference-message status for messages that quote the given message.

        Parameters:
        message - the source message
        status - reference message status (recalled or deleted)
        uiMessageList - the current UI message list
        Returns:

        updated UI message list for refreshing the screen

      • processMessageReferMsgStatus

         List<UiMessage> processMessageReferMsgStatus(Array<Message> messages, ReferenceMessageStatus status, List<UiMessage> uiMessageList)

        Updates the reference-message status for messages that quote any of the given messages.

        Parameters:
        messages - the source messages
        status - reference message status (recalled or deleted)
        uiMessageList - the current UI message list
        Returns:

        updated UI message list for refreshing the screen

      • updateReferenceView

         void updateReferenceView(List<Message> messages, List<UiMessage> uiMessageList)

        Updates the reference view after receiving message-edit events.

        Parameters:
        messages - the edited messages
        uiMessageList - the current UI message list
      • refreshReferenceMessage

         void refreshReferenceMessage(String editMsgUid, ChannelIdentifier identifier)

        Refreshes the reference message status for the given message UID.

        Parameters:
        editMsgUid - message UID
        identifier - channel identifier
      • checkEditedMessageDraftStatus

         void checkEditedMessageDraftStatus(ChannelIdentifier id)

        Checks edit-message draft status; called by InputPanel to decide whether to load a regular draft.

      • clearEditedMessageDraft

         void clearEditedMessageDraft(ChannelIdentifier id)

        Clears edit draft from both local cache and BaseChannel.editedMessageDraft.