-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] Fill in the tag and message of Offline
- Loading branch information
Linwenxuan
authored and
Linwenxuan
committed
Jan 26, 2024
1 parent
e388d5b
commit 92ab9fe
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
using Lagrange.Core.Internal.Event.Message; | ||
using Lagrange.Core.Message; | ||
using Lagrange.Core.Message.Entity; | ||
|
||
namespace Lagrange.Core.Internal.Context.Uploader; | ||
|
||
[HighwayUploader(typeof(FileEntity))] | ||
internal class FileUploader : IHighwayUploader | ||
{ | ||
public Task UploadPrivate(ContextCollection context, MessageChain chain, IMessageEntity entity) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public Task UploadGroup(ContextCollection context, MessageChain chain, IMessageEntity entity) | ||
public async Task UploadGroup(ContextCollection context, MessageChain chain, IMessageEntity entity) | ||
{ | ||
throw new NotImplementedException(); | ||
if (entity is FileEntity { FileStream: not null } file) | ||
{ | ||
var uploadEvent = GroupFSUploadEvent.Create(chain.GroupUin ?? 0, file); | ||
var result = await context.Business.SendEvent(uploadEvent); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters