Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/chat/components/AbstractChatMessage.js

48 lines
1.0 KiB

// @flow
import { PureComponent } from 'react';
import { getAvatarURLByParticipantId } from '../../base/participants';
/**
* The type of the React {@code Component} props of {@code AbstractChatMessage}.
*/
export type Props = {
/**
* The URL of the avatar of the participant.
*/
_avatarURL: string,
/**
* The representation of a chat message.
*/
message: Object,
/**
* Invoked to receive translated strings.
*/
t: Function
};
/**
* Abstract component to display a chat message.
*/
export default class AbstractChatMessage<P: Props> extends PureComponent<P> {}
/**
* Maps part of the Redux state to the props of this component.
*
* @param {Object} state - The Redux state.
* @param {Props} ownProps - The own props of the component.
* @returns {{
* _avatarURL: string
* }}
*/
export function _mapStateToProps(state: Object, ownProps: Props) {
const { message } = ownProps;
return {
_avatarURL: getAvatarURLByParticipantId(state, message.id)
};
}