({ recipientNodeId, content, metadata } = {})
| 7 | } |
| 8 | |
| 9 | send({ recipientNodeId, content, metadata } = {}) { |
| 10 | if (!recipientNodeId) throw new Error('recipientNodeId is required'); |
| 11 | if (!content) throw new Error('content is required'); |
| 12 | |
| 13 | return this.store.send({ |
| 14 | type: 'dm', |
| 15 | payload: { |
| 16 | recipient_node_id: recipientNodeId, |
| 17 | content, |
| 18 | metadata: metadata || {}, |
| 19 | sent_at: new Date().toISOString(), |
| 20 | }, |
| 21 | priority: 'normal', |
| 22 | }); |
| 23 | } |
| 24 | |
| 25 | poll({ limit } = {}) { |
| 26 | return this.store.poll({ |
no outgoing calls
no test coverage detected