File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,14 @@ public isolated class Controller {
30
30
statusCode = SUB_AUTO_VERIFY_ERROR );
31
31
}
32
32
33
- string 'key = retrieveKey (subscription );
33
+ string 'key = constructSubscriptionKey (subscription );
34
34
lock {
35
35
self .autoVerifyState ['key ] = subscription .cloneReadOnly ();
36
36
}
37
37
}
38
38
39
39
isolated function skipSubscriptionVerification(Subscription | Unsubscription subscription ) returns boolean {
40
- string 'key = retrieveKey (subscription );
40
+ string 'key = constructSubscriptionKey (subscription );
41
41
Subscription | Unsubscription ? skipped ;
42
42
lock {
43
43
skipped = self .autoVerifyState .removeIfHasKey ('key ).cloneReadOnly ();
@@ -46,10 +46,7 @@ public isolated class Controller {
46
46
}
47
47
}
48
48
49
- isolated function retrieveKey(record {} message ) returns string {
50
- string [] keyValuePairs = [];
51
- foreach var [_ , value ] in message .entries () {
52
- keyValuePairs .push (string ` ${value .toString ()}` );
53
- }
54
- return string : 'join (" :::" , ...keyValuePairs );
49
+ isolated function constructSubscriptionKey(record {} message ) returns string {
50
+ string [] values = message .toArray ().'map (v => string ` ${v .toString ()}` );
51
+ return string : 'join (" :::" , ...values );
55
52
}
You can’t perform that action at this time.
0 commit comments