Skip to content

Commit 0e67f96

Browse files
committed
fix: offset issue for getting reactions
1 parent 0b26163 commit 0e67f96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/stream-chat-angular/src/lib/channel.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ export class ChannelService<
14511451
async getMessageReactions(messageId: string) {
14521452
const reactions: ReactionResponse<T>[] = [];
14531453
const limit = 300;
1454-
const offset = 0;
1454+
let offset = 0;
14551455
const reactionsLimit = ChannelService.MAX_MESSAGE_REACTIONS_TO_FETCH;
14561456
let lastPageSize = limit;
14571457

@@ -1465,6 +1465,7 @@ export class ChannelService<
14651465
if (lastPageSize > 0) {
14661466
reactions.push(...response!.reactions);
14671467
}
1468+
offset += lastPageSize;
14681469
} catch (e) {
14691470
this.notificationService.addTemporaryNotification(
14701471
'Error loading reactions'

0 commit comments

Comments
 (0)