Skip to content
Open
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: 0 additions & 1 deletion docs/reference-skills-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ No meaningful return value. Used for its side effect.
```

### Notes / Limits
- **Deduplication:** `send` silently drops the call if `message` is identical to the previous one (`&lastsend` state). Change the text to send a near-duplicate.
- Channel selection is set at `initChannels` time via `commchannel`.

---
Expand Down
7 changes: 2 additions & 5 deletions src/channels.metta
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
(commChannelReceive))

;Send a message to all communication channels:
!(change-state! &lastsend "")
(= (send $msg)
(if (!= $msg (get-state &lastsend))
(progn (change-state! &lastsend $msg)
(let $safemsg (string-replace $msg "\n" "\\n")
(let $temp (cut) (commChannelSend $safemsg)))) _))
(let $safemsg (string-replace $msg "\n" "\\n")
(let $temp (cut) (commChannelSend $safemsg))))
Loading