diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-08 16:10:14 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-08 16:10:14 -0400 |
commit | bb16e95e15f6ea9b8941cae764570bdf7c0fdb59 (patch) | |
tree | bed0f4c3f0aabb9a163a1933236e2ff31482eec0 /src/components/messages/ChannelPreview.tsx | |
parent | 4d5e79c7bc6e5112684506047954a47f3a97e891 (diff) |
created util functions, updated isOnline
Diffstat (limited to 'src/components/messages/ChannelPreview.tsx')
-rw-r--r-- | src/components/messages/ChannelPreview.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/messages/ChannelPreview.tsx b/src/components/messages/ChannelPreview.tsx index 11408dc1..867e0a38 100644 --- a/src/components/messages/ChannelPreview.tsx +++ b/src/components/messages/ChannelPreview.tsx @@ -16,6 +16,7 @@ import { LocalUserType, } from '../../types'; import {normalize, SCREEN_HEIGHT} from '../../utils'; +import {isOnline} from '../../utils/messages'; const ChannelPreview: React.FC< ChannelPreviewMessengerProps< @@ -40,7 +41,7 @@ const ChannelPreview: React.FC< ) : []; const member = otherMembers.length === 1 ? otherMembers[0] : undefined; - const online = member?.user?.online; + const online = isOnline(member?.user?.last_active); const unread = channel.state.unreadCount > 0; return ( |