Unverified Commit 59828a24 authored by Hong Minhee's avatar Hong Minhee
Browse files

Automatically assign Activity.id if it has no id

parent 7d5fb32f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -102,7 +102,11 @@ export class Context<TContextData> {
    activity: Activity,
    { preferSharedInbox }: { preferSharedInbox?: boolean } = {},
  ): Promise<void> {
    // TODO: Give an id to the activity if it doesn't have one.
    if (activity.id == null) {
      activity = activity.clone({
        id: new URL(`urn:uuid:${crypto.randomUUID()}`),
      });
    }
    const { keyId, privateKey } = sender;
    validateCryptoKey(privateKey, "private");
    const inboxes = extractInboxes({