Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions native_backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func RecordActivity(_, _, _, _ string, _ any) {}

// ptrOf and hostError are used by wasm_backends.go (wasip1 only); provide
// stubs here so the non-WASM build does not need them.
//
//nolint:unused // used in wasm_backends.go in WASM builds
type hostError struct{ msg string }

Expand Down
11 changes: 3 additions & 8 deletions wasm_backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func EmitEvent(topic string, payload any) {
type activityInput struct {
TaskID string `json:"task_id"`
ProjectID string `json:"project_id"`
ActorID string `json:"actor_id"`
ActorID string `json:"actor_id,omitempty"`
ActivityType string `json:"activity_type"`
Content any `json:"content"`
}
Expand All @@ -202,13 +202,8 @@ func RecordActivity(taskID, projectID, actorUserID, activityType string, content
ActivityType: activityType,
Content: content,
}
payloadBytes, err := json.Marshal(inp)
if err != nil {
return
}
if !hostActivityRecord(int64(ptrOf(payloadBytes)), int64(len(payloadBytes))) {
return
}
payloadBytes, _ := json.Marshal(inp)
hostActivityRecord(int64(ptrOf(payloadBytes)), int64(len(payloadBytes)))
}

// ── Helpers ───────────────────────────────────────────────────────────────────
Expand Down
Loading