Skip to content

Commit c922ce3

Browse files
committed
fix: InMemoryPushNotificationConfigStore uses wrong pagination token.
* Using the 'id' field instead of the 'token' field as the pagination token. Fixes #554 Signed-off-by: Emmanuel Hugonnet <[email protected]>
1 parent 6038ee2 commit c922ce3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server-common/src/main/java/io/a2a/server/tasks/InMemoryPushNotificationConfigStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public ListTaskPushNotificationConfigResult getInfo(ListTaskPushNotificationConf
7070
if (configs.size() <= params.pageSize()) {
7171
return new ListTaskPushNotificationConfigResult(convertPushNotificationConfig(configs, params), null);
7272
}
73-
String newToken = configs.get(params.pageSize()).token();
73+
String newToken = configs.get(params.pageSize()).id();
7474
return new ListTaskPushNotificationConfigResult(convertPushNotificationConfig(configs.subList(0, params.pageSize()), params), newToken);
7575
}
7676

@@ -79,7 +79,7 @@ private int findFirstIndex(List<PushNotificationConfig> configs, String token) {
7979
Iterator<PushNotificationConfig> iter = configs.iterator();
8080
int index = 0;
8181
while (iter.hasNext()) {
82-
if (token.equals(iter.next().token())) {
82+
if (token.equals(iter.next().id())) {
8383
return index;
8484
}
8585
index++;

0 commit comments

Comments
 (0)