How do you send private message in response to a channel message? #14

Closed
opened 2026-10-05 06:09:12 +02:00 by adam · 0 comments
Owner

Update: Nevermind, digging deeper into the python library it doesn't look like it's possible directly; only by harvesting contacts and matching from there.

This use case is when writing bots, but when you receive a message in a channel there doesn't seem to be a way to send a private/direct message reply to the user. For example, you receive:

meshcore/message/channel/1: {"type": "EventType.CHANNEL_MSG_RECV", "payload": {"type": "CHAN", "channel_idx": 1, "path_len": 0, "txt_type": 0, "sender_timestamp": 1777763887, "text": "User-1: test"}, "attributes": {"channel_idx": 1, "txt_type": 0}}

And you then try to send a message to destination 'User-1' it fails with: Invalid public key hex string: User-1

Update: Nevermind, digging deeper into the python library it doesn't look like it's possible directly; only by harvesting contacts and matching from there. This use case is when writing bots, but when you receive a message in a channel there doesn't seem to be a way to send a private/direct message reply to the user. For example, you receive: meshcore/message/channel/1: {"type": "EventType.CHANNEL_MSG_RECV", "payload": {"type": "CHAN", "channel_idx": 1, "path_len": 0, "txt_type": 0, "sender_timestamp": 1777763887, "text": "User-1: test"}, "attributes": {"channel_idx": 1, "txt_type": 0}} And you then try to send a message to destination 'User-1' it fails with: Invalid public key hex string: User-1 <!-- github-sync-id:4370441238 -->
adam closed this issue 2026-10-05 06:09:12 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/meshcore-mqtt#14