mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix(bot): don't crash when sorting by last message and last message is null
This commit is contained in:
parent
74d621455a
commit
b1586c88e1
1 changed files with 1 additions and 1 deletions
|
|
@ -132,7 +132,7 @@ public static class ListOptionsExt
|
|||
.ThenBy(m => m.BirthdayPrivacy.Get(ctx, m.AnnualBirthday), ReverseMaybe(Comparer<AnnualDate?>.Default)),
|
||||
SortProperty.LastMessage => input
|
||||
.OrderByDescending(m => m.LastMessageTimestamp.HasValue)
|
||||
.ThenByDescending(m => m.LastMessageTimestamp!.Value, ReverseMaybe(Comparer<Instant?>.Default)),
|
||||
.ThenByDescending(m => m.LastMessageTimestamp, ReverseMaybe(Comparer<Instant?>.Default)),
|
||||
SortProperty.LastSwitch => input
|
||||
.OrderByDescending(m => m.LastSwitchTime.HasValue && m.MetadataPrivacy.CanAccess(ctx))
|
||||
.ThenByDescending(m => m.MetadataPrivacy.Get(ctx, m.LastSwitchTime), ReverseMaybe(Comparer<Instant?>.Default)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue