Skip to content

Commit

Permalink
[OneBot] Implemented mark_msg_as_read Operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan04 committed Mar 2, 2024
1 parent b8926b8 commit 4d0af92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lagrange.Core/Message/Entity/FileEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public FileEntity()

/// <summary>
/// This entity could not be directly sent via <see cref="MessageChain"/>,
/// it should be sent via <see cref="Lagrange.Core.Common.Interface.Api.GroupExt.UploadFile"/>
/// it should be sent via <see cref="Lagrange.Core.Common.Interface.Api.GroupExt.GroupFSUpload"/>
/// </summary>
public FileEntity(string path)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public async Task<OneBotResult> HandleOperation(BotContext context, JsonNode? pa
{
var record = database.GetCollection<MessageRecord>().FindOne(x => x.MessageHash == getMsg.MessageId);
var chain = (MessageChain)record;
await context.MarkAsRead(chain);
bool result = await context.MarkAsRead(chain);
return new OneBotResult(null, result ? 0 : 1, result ? "ok" : "failed");
}

throw new Exception();
Expand Down

0 comments on commit 4d0af92

Please sign in to comment.