@astrosheep/square 0.3.33 → 0.3.34
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.
package/dist/activity.js
CHANGED
|
@@ -79,13 +79,11 @@ export async function cmdActivity(squarePath, name, activity, resolveBody, opts)
|
|
|
79
79
|
const pendingPublic = before.pendingPublic;
|
|
80
80
|
const pendingRoomChanges = before.pendingRoomChanges;
|
|
81
81
|
try {
|
|
82
|
-
|
|
82
|
+
await participant.express(body, {
|
|
83
83
|
force,
|
|
84
84
|
...(reach === undefined ? {} : { reach }),
|
|
85
85
|
...(opts.reply === undefined ? {} : { reply: formatActivityId(opts.reply) }),
|
|
86
86
|
});
|
|
87
|
-
if (result.delivery?.notCapable)
|
|
88
|
-
process.stderr.write(`! wake not-capable: ${result.delivery.notCapable}\n`);
|
|
89
87
|
const freshSquare = await openSquare(squarePath, { clock: nowMs });
|
|
90
88
|
const fresh = await activityPresentation(freshSquare, knownName).finally(() => closeOpenSquare(freshSquare));
|
|
91
89
|
const headerCount = fresh.participantCount;
|
|
@@ -107,6 +107,8 @@ export async function presentPendingAtBoundary(sessionId, present, lookup = sess
|
|
|
107
107
|
const prior = presentationLocks.get(key);
|
|
108
108
|
if (prior !== undefined) {
|
|
109
109
|
await prior;
|
|
110
|
+
if (!rendered)
|
|
111
|
+
return undefined;
|
|
110
112
|
continue;
|
|
111
113
|
}
|
|
112
114
|
const work = presentPending({ artifact: square.artifact, location: entry.membership.squarePath, participant: entry.membership.name, activity: index, hostLedger: square.hostLedger, session: sessionId, sink: { present: renderOnce }, markSeen: entry.markSeen, now: Date.now() }).then(async (outcome) => {
|
|
@@ -125,6 +127,8 @@ export async function presentPendingAtBoundary(sessionId, present, lookup = sess
|
|
|
125
127
|
finally {
|
|
126
128
|
presentationLocks.delete(key);
|
|
127
129
|
}
|
|
130
|
+
if (!rendered)
|
|
131
|
+
return undefined;
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
finally {
|
|
@@ -59,16 +59,16 @@ export async function deliverPending(input) {
|
|
|
59
59
|
let notCapable = 0;
|
|
60
60
|
for (const membership of observation.pending) {
|
|
61
61
|
for (const notification of membership.notifications) {
|
|
62
|
-
const candidates = routes.filter((route) => nameKey(route.participant) === nameKey(membership.recipient));
|
|
63
|
-
if (candidates.length === 0) {
|
|
64
|
-
notCapable += 1;
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
62
|
if (input.activity !== undefined) {
|
|
68
63
|
const requested = typeof input.activity === 'number' ? input.activity : parseActivityId(input.activity);
|
|
69
64
|
if (requested === undefined || requested !== notification.item.index)
|
|
70
65
|
continue;
|
|
71
66
|
}
|
|
67
|
+
const candidates = routes.filter((route) => nameKey(route.participant) === nameKey(membership.recipient));
|
|
68
|
+
if (candidates.length === 0) {
|
|
69
|
+
notCapable += 1;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
72
|
let acceptedForAttention = false;
|
|
73
73
|
try {
|
|
74
74
|
const prior = await input.hostLedger.listWakeAttempts({ attention: { squarePath: input.location, actIndex: notification.item.index, recipient: membership.recipient }, now: input.now });
|