@devicecloud.dev/dcd 5.11.0-beta.10 → 5.11.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -190,8 +190,11 @@ export function humanFields(human, now = Date.now()) {
|
|
|
190
190
|
const fields = [['state', humanState(human)]];
|
|
191
191
|
if (human.reason)
|
|
192
192
|
fields.push(['reason', human.reason]);
|
|
193
|
+
// A person who took control unasked: the reason is "<email> took control",
|
|
194
|
+
// and nobody asked for anything.
|
|
195
|
+
const tookControl = human.human_in_control && !!human.reason?.endsWith(' took control');
|
|
193
196
|
if (human.since)
|
|
194
|
-
fields.push(['asked', formatWhen(human.since, now)]);
|
|
197
|
+
fields.push([tookControl ? 'since' : 'asked', formatWhen(human.since, now)]);
|
|
195
198
|
if (human.waiting && human.expires_at) {
|
|
196
199
|
fields.push(['ends', `${formatWhen(human.expires_at, now)} unless they hand it back`]);
|
|
197
200
|
}
|
package/package.json
CHANGED