Class MessageKt

  • All Implemented Interfaces:

    
    public final class MessageKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final static Date NEVER
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • users

         final static List<User> users(Message $self)
      • updateUsers

         final static Message updateUsers(Message $self, Map<String, User> users)

        Updates a message with more recent data of users. It updates author user, latestReactions, replyTo message, mentionedUsers, threadParticipants and pinnedBy user of this instance.

      • populateMentions

         final static Message populateMentions(Message $self, Channel channel)

        Fills Message.mentionedUsersIds based on Message.text and Channel.members.

        It combines the users found in the input with pre-set Message.mentionedUsersIds, in case someone is manually added as a mention. Currently only searches through the channel members for possible mentions.

        Parameters:
        channel - The channel whose members we can check for the mention.
      • shouldIncrementUnreadCount

         final static Boolean shouldIncrementUnreadCount(Message $self, String currentUserId, Date lastMessageAtDate, Boolean isChannelMuted)

        Function that parses if the unread count should be increased or not.

        Parameters:
        currentUserId - The id of the user that the unread count should be evaluated.
        lastMessageAtDate - The Date of the last message the SDK is aware of.
        isChannelMuted - If the channel is muted for the current user or not.