-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
receive file message via
group_upload
support
not tested yet, #111
- Loading branch information
Showing
9 changed files
with
123 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,6 @@ class File { | |
var size = 0L | ||
@SerializedName("busid") | ||
var busId = 0L | ||
@SerializedName("url") | ||
var url = "" | ||
} |
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
17 changes: 17 additions & 0 deletions
17
overflow-core-api/src/main/kotlin/top/mrxiaom/overflow/message/data/FileMessageWithUrl.kt
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package top.mrxiaom.overflow.message.data | ||
|
||
import net.mamoe.mirai.message.data.FileMessage | ||
|
||
/** | ||
* 带链接的文件消息 | ||
* | ||
* 注意,这个消息类型提供的文件链接并不可靠,可能为空字符串。 | ||
* | ||
* 基本上,仅在开启 use_group_upload_event_for_file_message 的情况下,从消息收到文件消息时可提供链接。 | ||
*/ | ||
interface FileMessageWithUrl : FileMessage { | ||
val url: String | ||
} | ||
|
||
val FileMessage.withUrl: FileMessageWithUrl | ||
get() = this as FileMessageWithUrl |
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
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