MessageController: return all messages by sent at, not just 1
This commit is contained in:
parent
baff13926b
commit
9db19283ac
5 changed files with 128 additions and 16 deletions
|
@ -90,6 +90,18 @@ class FilterIterator<T> implements Iterator<T> {
|
|||
}
|
||||
}
|
||||
|
||||
export function find<T>(
|
||||
iterable: Iterable<T>,
|
||||
predicate: (value: T) => unknown
|
||||
): undefined | T {
|
||||
for (const value of iterable) {
|
||||
if (predicate(value)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function groupBy<T>(
|
||||
iterable: Iterable<T>,
|
||||
fn: (value: T) => string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue