Closed tarasverq closed 3 years ago
I've simplified the code. I am not sure that .OrderBy(x => x.Id)
is needed. Are you sure that fetched messages are not sorted by id already?
I'm not sure about sorting, this was just to be sure.
By the way this approach will not work:
var groupId = messages.Find(x => x.Id == messageId).Bind(x => x.GroupedId);
return messages.Filter(x => x.GroupedId == groupId);
In case of single message groupId
variable will be Option.None
, so you will return all single messages near messageId
.
We should check groupId
for None
option.
Yeah, but it is fixed already
Can you verify that id's are ordered and the method works as expected?
checked: ids is in ascending order
good
Hi Ilya!
Some new useful methods for library