Skip to content

fix(nostr): use dispatchReplyFromConfig for inbound messages#4

Open
internalG wants to merge 1 commit into
internalG:feature/nostr-chatfrom
Abhijrathod:fix/nostr-handle-inbound-message-4547
Open

fix(nostr): use dispatchReplyFromConfig for inbound messages#4
internalG wants to merge 1 commit into
internalG:feature/nostr-chatfrom
Abhijrathod:fix/nostr-handle-inbound-message-4547

Conversation

@internalG

Copy link
Copy Markdown
Owner

The Nostr channel was calling a non-existent handleInboundMessage method on the plugin runtime. This refactors the onMessage handler to use the correct API pattern:

  • Build proper MsgContext with all required fields
  • Finalize context with finalizeInboundContext
  • Record session metadata with recordInboundSession
  • Create reply dispatcher with createReplyDispatcherWithTyping
  • Dispatch to agent with dispatchReplyFromConfig

This follows the same pattern used by Matrix, MS Teams, and Mattermost channel extensions.

Fixes openclaw#4547

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem:
  • Why it matters:
  • What changed:
  • What did NOT change (scope boundary):

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • New/changed network calls? (Yes/No)
  • Command/tool execution surface changed? (Yes/No)
  • Data access scope changed? (Yes/No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS:
  • Runtime/container:
  • Model/provider:
  • Integration/channel (if any):
  • Relevant config (redacted):

Steps

Expected

Actual

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  • Edge cases checked:
  • What you did not verify:

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly:
  • Files/config to restore:
  • Known bad symptoms reviewers should watch for:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Mitigation:

The Nostr channel was calling a non-existent handleInboundMessage
method on the plugin runtime. This refactors the onMessage handler
to use the correct API pattern:

- Build proper MsgContext with all required fields
- Finalize context with finalizeInboundContext
- Record session metadata with recordInboundSession
- Create reply dispatcher with createReplyDispatcherWithTyping
- Dispatch to agent with dispatchReplyFromConfig

This follows the same pattern used by Matrix, MS Teams, and
Mattermost channel extensions.

Fixes openclaw#4547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants