Skip to content

Commit 8a010f7

Browse files
authored
Merge pull request #36 from CodeShellDev/main
README Update
2 parents fd8873c + 63c9309 commit 8a010f7

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,10 @@ Placeholders can be added by setting `VARIABLES` inside your Environment.
261261
```yaml
262262
environment:
263263
VARIABLES: |
264-
"NUMBER2": "002",
265-
"GROUP_CHAT_1": [
266-
"user.id",
267-
"000",
268-
"001",
269-
"group.id"
270-
]
264+
"NUMBER2": "002",
265+
"GROUP_CHAT_1": [
266+
"user.id", "000", "001", "group.id"
267+
]
271268
```
272269

273270
### Recipients
@@ -292,25 +289,30 @@ example:
292289

293290
To improve compatibility with other services Secured Signal API provides aliases for the `message` attribute by default:
294291

295-
| Alias | Priority |
296-
| ----------- | -------- |
297-
| msg | 100 |
298-
| content | 99 |
299-
| description | 98 |
300-
| text | 20 |
301-
| body | 15 |
302-
| summary | 10 |
303-
| details | 9 |
304-
| payload | 2 |
305-
| data | 1 |
292+
| Alias | Score |
293+
| ----------- | ----- |
294+
| msg | 100 |
295+
| content | 99 |
296+
| description | 98 |
297+
| text | 20 |
298+
| body | 15 |
299+
| summary | 10 |
300+
| details | 9 |
301+
| payload | 2 |
302+
| data | 1 |
306303

307-
Secured Signal API will use the highest priority Message Alias to extract the correct message from the Request Body.
304+
Secured Signal API will pick the best scoring Message Alias (if available) to extract the correct message from the Request Body.
308305

309-
Message Aliases can be added by setting `MESSAGE_ALIASES`:
306+
Message Aliases can be added by setting `MESSAGE_ALIASES` to a valid json array containing dictionaries of `alias`, the json key to be used for lookup (use `.` dots for using values from a nested dictionary and `[i]` to get values from an array):
310307

311308
```yaml
312309
environment:
313-
MESSAGE_ALIASES: ' [{ "alias": "note", "priority": 4 }, { "alias": "test", "priority": 3 }] '
310+
MESSAGE_ALIASES: |
311+
[
312+
{ "alias": "msg", "score": 80 },
313+
{ "alias": "data.message", "score": 79 },
314+
{ "alias": "array[0].message", "score": 78 },
315+
]
314316
```
315317

316318
## Contributing

0 commit comments

Comments
 (0)