mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 23:30:28 +03:00
Show date for msgs older than a day
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
e20b9d054d
commit
ca55141276
4 changed files with 20 additions and 13 deletions
|
|
@ -412,7 +412,7 @@ function getEditedBody(editedMEvent) {
|
|||
}
|
||||
|
||||
function Message({
|
||||
mEvent, isBodyOnly, roomTimeline, focus,
|
||||
mEvent, isBodyOnly, roomTimeline, focus, time
|
||||
}) {
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
|
||||
|
|
@ -431,7 +431,6 @@ function Message({
|
|||
let { body } = content;
|
||||
const avatarSrc = mEvent.sender.getAvatarUrl(initMatrix.matrixClient.baseUrl, 36, 36, 'crop');
|
||||
const username = getUsernameOfRoomMember(mEvent.sender);
|
||||
const time = `${dateFormat(mEvent.getDate(), 'hh:MM TT')}`;
|
||||
|
||||
if (typeof body === 'undefined') return null;
|
||||
if (msgType === 'm.emote') className.push('message--type-emote');
|
||||
|
|
@ -627,6 +626,7 @@ Message.propTypes = {
|
|||
isBodyOnly: PropTypes.bool,
|
||||
roomTimeline: PropTypes.shape({}).isRequired,
|
||||
focus: PropTypes.bool,
|
||||
time: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export { Message, MessageReply, PlaceholderMessage };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue