Skip to content

Commit

Permalink
[OneBot] fix unable to get history without specifying message id (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkRRb authored Feb 13, 2025
1 parent 00df5d6 commit 5543701
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task<OneBotResult> HandleOperation(BotContext context, JsonNode? pa
{
var chain = realm.Do<MessageChain>(realm => history.MessageId == 0
? realm.All<MessageRecord>()
.Where(record => record.FromUin == history.UserId)
.Where(record => record.FromUinLong == history.UserId)
.OrderByDescending(record => record.Time)
.First()
: realm.All<MessageRecord>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public async Task<OneBotResult> HandleOperation(BotContext context, JsonNode? pa
{
var sequence = realm.Do(realm => history.MessageId == 0
? realm.All<MessageRecord>()
.Where(record => record.ToUin == history.GroupId)
.Where(record => record.ToUinLong == history.GroupId)
.OrderByDescending(x => x.Time)
.First()
.Sequence
Expand Down

0 comments on commit 5543701

Please sign in to comment.