File tree Expand file tree Collapse file tree
acidify-milky/src/commonMain/kotlin/org/ntqqrev/acidify/milky Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ val apiHandlers = listOf(
180180 MoveGroupFile ,
181181 RenameGroupFile ,
182182 DeleteGroupFile ,
183+ PersistGroupFile ,
183184 CreateGroupFolder ,
184185 RenameGroupFolder ,
185186 DeleteGroupFolder ,
Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ val DeleteGroupFile = ApiEndpoint.DeleteGroupFile.define {
5959 DeleteGroupFileOutput ()
6060}
6161
62+ val PersistGroupFile = ApiEndpoint .PersistGroupFile .define {
63+ bot.persistGroupFile(it.groupId, it.fileId)
64+ PersistGroupFileOutput ()
65+ }
66+
6267val CreateGroupFolder = ApiEndpoint .CreateGroupFolder .define {
6368 val folderId = bot.createGroupFolder(it.groupId, it.folderName)
6469 CreateGroupFolderOutput (folderId)
Original file line number Diff line number Diff line change @@ -167,6 +167,15 @@ suspend fun MilkyContext.transformAcidifyEvent(event: AcidifyEvent): Event? {
167167 )
168168 )
169169
170+ is GroupDisbandEvent -> Event .GroupDisband (
171+ time = Clock .System .now().epochSeconds,
172+ selfId = bot.uin,
173+ data = Event .GroupDisband .Data (
174+ groupId = event.groupUin,
175+ operatorId = event.operatorUin,
176+ )
177+ )
178+
170179 is GroupNameChangeEvent -> Event .GroupNameChange (
171180 time = Clock .System .now().epochSeconds,
172181 selfId = bot.uin,
Original file line number Diff line number Diff line change @@ -169,9 +169,9 @@ suspend fun MilkyContext.transformIncomingSegment(segment: BotIncomingSegment):
169169 )
170170 )
171171
172- is BotIncomingSegment .Markdown -> IncomingSegment .Text (
173- data = IncomingSegment .Text .Data (
174- text = segment.content // TODO: Markdown segment
172+ is BotIncomingSegment .Markdown -> IncomingSegment .Markdown (
173+ data = IncomingSegment .Markdown .Data (
174+ content = segment.content
175175 )
176176 )
177177 }
@@ -254,12 +254,11 @@ suspend fun MilkyContext.transformOutgoingSegment(
254254 }
255255
256256 is OutgoingSegment .Video -> {
257- // TODO: refactor Codec API to Source-based
258257 val videoSource = resolveUri(segment.data.uri)
259258 val videoInfo = codec.getVideoInfo(videoSource)
260259 logger.d { " 视频 ${segment.data.uri} 信息:${videoInfo.width} x${videoInfo.height} ,时长 ${videoInfo.duration.inWholeSeconds} 秒" }
261260 val thumbSource = if (segment.data.thumbUri != null ) {
262- resolveUri(segment.data.thumbUri!! )
261+ resolveUri(segment.data.thumbUri)
263262 } else {
264263 tracked {
265264 codec.getVideoFirstFrameJpg(videoSource).toMediaSource()
You can’t perform that action at this time.
0 commit comments