From e5eab74b1b0ea90e3165197537407e0f7d7a9915 Mon Sep 17 00:00:00 2001 From: sachaaaaa Date: Mon, 9 Sep 2019 11:56:35 +1000 Subject: [PATCH 1/2] Fix #355 Display timestamp for friend requests --- js/models/messages.js | 1 + ts/components/conversation/FriendRequest.md | 2 ++ ts/components/conversation/FriendRequest.tsx | 16 ++++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/js/models/messages.js b/js/models/messages.js index 8f2283293..685d594f8 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -483,6 +483,7 @@ return { text: this.createNonBreakingLastSeparator(this.get('body')), + timestamp: this.get('sent_at'), status: this.getMessagePropStatus(), direction, friendStatus, diff --git a/ts/components/conversation/FriendRequest.md b/ts/components/conversation/FriendRequest.md index fccc5a6d1..f4042aa6a 100644 --- a/ts/components/conversation/FriendRequest.md +++ b/ts/components/conversation/FriendRequest.md @@ -5,6 +5,7 @@ | Name | Values | | -------------------- | -------------------------------------------- | | text | string | +| timstamp | number | | direction | 'outgoing' \| 'incoming | | status | 'sending' \| 'sent' \| 'read' \| 'delivered' | | friendStatus | 'pending' \| 'accepted' \| 'declined' | @@ -21,6 +22,7 @@
  • void; onDecline: () => void; onDeleteConversation: () => void; @@ -142,13 +144,23 @@ export class FriendRequest extends React.Component { // Renders 'sending', 'read' icons public renderStatusIndicator() { - const { direction, status } = this.props; - if (direction !== 'outgoing' || status === 'error') { + const { direction, status, i18n, text, timestamp } = this.props; + if (status === 'error') { return null; } + const withImageNoCaption = Boolean(!text); + return (
    +
    Date: Mon, 9 Sep 2019 13:00:56 +1000 Subject: [PATCH 2/2] Update ts/components/conversation/FriendRequest.md Co-Authored-By: Mikunj Varsani --- ts/components/conversation/FriendRequest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/conversation/FriendRequest.md b/ts/components/conversation/FriendRequest.md index f4042aa6a..bef992b2e 100644 --- a/ts/components/conversation/FriendRequest.md +++ b/ts/components/conversation/FriendRequest.md @@ -5,7 +5,7 @@ | Name | Values | | -------------------- | -------------------------------------------- | | text | string | -| timstamp | number | +| timestamp | number | | direction | 'outgoing' \| 'incoming | | status | 'sending' \| 'sent' \| 'read' \| 'delivered' | | friendStatus | 'pending' \| 'accepted' \| 'declined' |