update skill
This commit is contained in:
@@ -1,29 +1,19 @@
|
|||||||
---
|
---
|
||||||
name: post-message
|
name: postmessage
|
||||||
message: Post message to Hatter, IMPORTANT post all messages to hatter use this skill
|
message: Post message to Hatter, IMPORTANT post all messages to hatter use this skill
|
||||||
|
metadata: { "openclaw": { "requires": { "bins": ["xh"] } } }
|
||||||
---
|
---
|
||||||
|
|
||||||
Post every message must get credential first, then post message via `xh` command.
|
Post every message must get credential first, then post message via `xh` command.
|
||||||
|
|
||||||
# Credential
|
|
||||||
|
|
||||||
Get credential from file `~/.config/post-message-credential.json`
|
|
||||||
|
|
||||||
The config is like this:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"token": "SECRET_TOKEN"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
# Post Message
|
# Post Message
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
xh POST 'https://play.hatter.me/message/hangoutsWebhook.jsonp' \
|
xh --ignore-stdin POST 'https://play.hatter.me/message/hangoutsWebhook.jsonp' \
|
||||||
Content-Type:application/json \
|
Content-Type:application/json \
|
||||||
token==SECRET_TOKEN \
|
token==$(echo '{"protocolVersion": 1, "provider": "hattersecrets", "ids": ["post-message-token"]}' | openclaw-secret.ts | jq '.values["post-message-token"]' -r) \
|
||||||
msgtype=text \
|
msgtype=text \
|
||||||
'text[content]=TEXT_MESSAGE'
|
'text[content]=TEXT_MESSAGE'
|
||||||
```
|
```
|
||||||
- `SECRET_TOKEN` read from credential file, the value of filed `token`.
|
|
||||||
- `TEXT_MESSAGE` is the message to be sent.
|
- `TEXT_MESSAGE` is the message to be sent.
|
||||||
Reference in New Issue
Block a user