Slack modules: declare charset in Content-Type
Add "; charset=utf-8" to the JSON Content-Type header so Slack's users.profile.set no longer returns the missing_charset warning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,14 +13,14 @@ modules:
|
|||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.profile.set \
|
curl -s -X POST https://slack.com/api/users.profile.set \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"profile":{"status_emoji":"{{.emoji}}","status_text":"{{.text}}","status_expiration":{{expiry .expiry}}}}'
|
-d '{"profile":{"status_emoji":"{{.emoji}}","status_text":"{{.text}}","status_expiration":{{expiry .expiry}}}}'
|
||||||
|
|
||||||
clear_status:
|
clear_status:
|
||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.profile.set \
|
curl -s -X POST https://slack.com/api/users.profile.set \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"profile":{"status_emoji":"","status_text":"","status_expiration":0}}'
|
-d '{"profile":{"status_emoji":"","status_text":"","status_expiration":0}}'
|
||||||
|
|
||||||
set_presence:
|
set_presence:
|
||||||
@@ -29,7 +29,7 @@ modules:
|
|||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.setPresence \
|
curl -s -X POST https://slack.com/api/users.setPresence \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"presence":"{{.presence}}"}'
|
-d '{"presence":"{{.presence}}"}'
|
||||||
|
|
||||||
snooze:
|
snooze:
|
||||||
@@ -38,18 +38,18 @@ modules:
|
|||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/dnd.setSnooze \
|
curl -s -X POST https://slack.com/api/dnd.setSnooze \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"num_minutes":{{.minutes}}}'
|
-d '{"num_minutes":{{.minutes}}}'
|
||||||
|
|
||||||
go_offline:
|
go_offline:
|
||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.setPresence \
|
curl -s -X POST https://slack.com/api/users.setPresence \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"presence":"away"}' && \
|
-d '{"presence":"away"}' && \
|
||||||
curl -s -X POST https://slack.com/api/users.profile.set \
|
curl -s -X POST https://slack.com/api/users.profile.set \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"profile":{"status_emoji":":dumpsterfire:","status_text":"Offline","status_expiration":0}}'
|
-d '{"profile":{"status_emoji":":dumpsterfire:","status_text":"Offline","status_expiration":0}}'
|
||||||
|
|
||||||
end_snooze:
|
end_snooze:
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ modules:
|
|||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.profile.set \
|
curl -s -X POST https://slack.com/api/users.profile.set \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"profile":{"status_emoji":"{{.emoji}}","status_text":"{{.text}}","status_expiration":{{expiry .expiry}}}}'
|
-d '{"profile":{"status_emoji":"{{.emoji}}","status_text":"{{.text}}","status_expiration":{{expiry .expiry}}}}'
|
||||||
|
|
||||||
clear_status:
|
clear_status:
|
||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.profile.set \
|
curl -s -X POST https://slack.com/api/users.profile.set \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"profile":{"status_emoji":"","status_text":"","status_expiration":0}}'
|
-d '{"profile":{"status_emoji":"","status_text":"","status_expiration":0}}'
|
||||||
|
|
||||||
set_presence:
|
set_presence:
|
||||||
@@ -29,7 +29,7 @@ modules:
|
|||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.setPresence \
|
curl -s -X POST https://slack.com/api/users.setPresence \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"presence":"{{.presence}}"}'
|
-d '{"presence":"{{.presence}}"}'
|
||||||
|
|
||||||
snooze:
|
snooze:
|
||||||
@@ -38,18 +38,18 @@ modules:
|
|||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/dnd.setSnooze \
|
curl -s -X POST https://slack.com/api/dnd.setSnooze \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"num_minutes":{{.minutes}}}'
|
-d '{"num_minutes":{{.minutes}}}'
|
||||||
|
|
||||||
go_offline:
|
go_offline:
|
||||||
exec: |
|
exec: |
|
||||||
curl -s -X POST https://slack.com/api/users.setPresence \
|
curl -s -X POST https://slack.com/api/users.setPresence \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"presence":"away"}' && \
|
-d '{"presence":"away"}' && \
|
||||||
curl -s -X POST https://slack.com/api/users.profile.set \
|
curl -s -X POST https://slack.com/api/users.profile.set \
|
||||||
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
-H "Authorization: Bearer {{env "SLACK_TOKEN"}}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json; charset=utf-8" \
|
||||||
-d '{"profile":{"status_emoji":":dumpsterfire:","status_text":"Offline","status_expiration":0}}'
|
-d '{"profile":{"status_emoji":":dumpsterfire:","status_text":"Offline","status_expiration":0}}'
|
||||||
|
|
||||||
end_snooze:
|
end_snooze:
|
||||||
|
|||||||
Reference in New Issue
Block a user