File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -121,19 +121,19 @@ export function getUserLastActiveAsRelativeTimeString(
121
121
if ( ! presence ) {
122
122
return null ;
123
123
}
124
- const userStatus = getUserStatus ( state , user . user_id ) ;
125
- const zulipFeatureLevel = getZulipFeatureLevel ( state ) ;
126
-
127
- if ( ! presence || ! presence . aggregated ) {
124
+ if ( ! presence . aggregated ) {
128
125
return 'never' ;
129
126
}
130
-
131
127
const lastTimeActive = new Date ( presence . aggregated . timestamp * 1000 ) ;
132
128
133
129
// "Invisible mode", new in FL 148, doesn't involve UserStatus['away']:
134
130
// https://chat.zulip.org/#narrow/stream/2-general/topic/.22unavailable.22.20status/near/1454779
135
131
// TODO(server-6.0): Simplify this away.
136
- if ( zulipFeatureLevel < 148 && userStatus . away && differenceInDays ( dateNow , lastTimeActive ) < 1 ) {
132
+ if (
133
+ getZulipFeatureLevel ( state ) < 148
134
+ && getUserStatus ( state , user . user_id ) . away
135
+ && differenceInDays ( dateNow , lastTimeActive ) < 1
136
+ ) {
137
137
// Be vague when an unavailable user is recently online.
138
138
// TODO: This phrasing doesn't really match the logic and can be misleading.
139
139
return 'today' ;
You can’t perform that action at this time.
0 commit comments