Skip to content

Commit

Permalink
fix(jq): do not truncate messages containing a colon
Browse files Browse the repository at this point in the history
  • Loading branch information
git-developer committed Jul 27, 2024
1 parent 59c6147 commit 3ddff7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions image/signal-mqtt.jq
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def to_topic(pattern):
;

def to_jsonrpc(message):
split("/") + ["message", $message] | {
split("/") | {
jsonrpc: "2.0",
(.[0]): .[1],
params: [. as $v | range(2; length; 2) | {($v[.]): $v[(.+1)] | cast}] | add
params: ([. as $v | range(2; length; 2) | {($v[.]): $v[(.+1)] | cast}] + [{message: $message}]) | add
}
;

0 comments on commit 3ddff7d

Please sign in to comment.