File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ ent:established [
69
69
},...,...
70
70
]
71
71
*/
72
- wellknown_Policy = {
72
+ wellknown_Policy = { // we need to restrict what attributes are allowed on this channel, specifically Id.
73
73
"name": "wellknown",
74
74
"event": {
75
75
"allow": [
@@ -122,12 +122,14 @@ ent:established [
122
122
random:word()
123
123
}
124
124
pending_entry = function(){
125
- roles = event:attr("Rx_role").isnull() => {} | {
125
+ roles = event:attr("Rx_role").isnull() => {} | { // add possible roles
126
126
"Rx_role" : event:attr("Rx_role"),
127
127
"Tx_role" : event:attr("Tx_role")
128
128
};
129
- event:attr("Tx_host").isnull() =>
130
- roles | roles.put(["Tx_host"] , event:attr("Tx_host"))
129
+ _roles = event:attr("Tx_host").isnull() => // add possible host
130
+ roles | roles.put(["Tx_host"] , event:attr("Tx_host"));
131
+ event:attr("Id").isnull() => // add subscription identifier
132
+ _roles.put(["Id"], random:uuid()) | _roles.put(["Id"], event:attr("Id"))
131
133
}
132
134
133
135
}
You can’t perform that action at this time.
0 commit comments