Class RoomMessage<E extends RoomMessageContent>

  • Type Parameters:
    E - The message content type.

    public class RoomMessage<E extends RoomMessageContent>
    extends RoomEvent<E>
    This event is used when sending messages in a room. Messages are not limited to be text. The ``msgtype`` key outlines the type of message, e.g. text, audio, image, video, etc. The ``body`` key is text and MUST be used with every kind of ``msgtype`` as a fallback mechanism for when a client cannot render a message. This allows clients to display *something* even if it is just plain text.
    • Field Detail

      • TYPE

        public static final String TYPE
        This event is used when sending messages in a room. Messages are not limited to be text. The msgtype key outlines the type of message, e.g. text, audio, image, video, etc. The body key is text and MUST be used with every kind of msgtype as a fallback mechanism for when a client cannot render a message. This allows clients to display something even if it is just plain text. For more information on msgtypes, see m.room.message msgtypes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RoomMessage

        public RoomMessage()
    • Method Detail

      • getType

        public String getType()
        Description copied from class: Event
        Required. The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'.
        Specified by:
        getType in class Event<E extends RoomMessageContent>
        Returns:
        The type of the event.