Skip to content

Commit

Permalink
fix(channel-service): fix getMessage sublist returned
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-borriello00 committed May 21, 2024
1 parent 72b72bd commit 9e83a53
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ open class ChannelService(
return Result.success(
ChannelQuery.GetMessagesFromChannelId.Response(
channel.messages.subList(
request.from,
request.limit.coerceAtMost(channel.messages.size)
request.from.coerceAtMost(channel.messages.size),
(request.from + request.limit).coerceAtMost(channel.messages.size)
)
)
)
Expand Down

0 comments on commit 9e83a53

Please sign in to comment.