mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-28 17:40:09 +08:00
Merge remote-tracking branch 'mirai/dev' into dev
This commit is contained in:
commit
fef0b4220a
@ -36,7 +36,7 @@ public sealed class Nudge {
|
||||
public abstract val target: UserOrBot
|
||||
|
||||
/**
|
||||
* 发送戳一戳该成员的消息到 [receiver].
|
||||
* 发送戳一戳消息到 [receiver].
|
||||
*
|
||||
* 需要 [使用协议][BotConfiguration.protocol] [MiraiProtocol.ANDROID_PHONE].
|
||||
*
|
||||
@ -55,7 +55,7 @@ public sealed class Nudge {
|
||||
|
||||
public companion object {
|
||||
/**
|
||||
* 发送戳一戳该成员的消息.
|
||||
* 发送戳一戳消息.
|
||||
*
|
||||
* 需要 [使用协议][BotConfiguration.protocol] [MiraiProtocol.ANDROID_PHONE].
|
||||
*
|
||||
@ -109,4 +109,4 @@ public data class FriendNudge(
|
||||
*/
|
||||
public data class StrangerNudge(
|
||||
public override val target: Stranger
|
||||
) : UserNudge()
|
||||
) : UserNudge()
|
||||
|
@ -208,7 +208,7 @@ internal fun RichMessage.Key.longMessage(brief: String, resId: String, timeSecon
|
||||
</item>
|
||||
<source name="聊天记录" icon="" action="" appid="-1"/>
|
||||
</msg>
|
||||
""".trimIndent()
|
||||
""".trimIndent().trim()
|
||||
|
||||
return LongMessageInternal(template, resId)
|
||||
}
|
||||
@ -220,7 +220,7 @@ internal fun RichMessage.Key.forwardMessage(
|
||||
forwardMessage: ForwardMessage,
|
||||
): ForwardMessageInternal = with(forwardMessage) {
|
||||
val template = """
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<msg serviceID="35" templateID="1" action="viewMultiMsg" brief="${brief.take(30)}"
|
||||
m_resid="$resId" m_fileName="$timeSeconds"
|
||||
tSum="3" sourceMsgId="0" url="" flag="3" adverSign="0" multiMsgFlag="0">
|
||||
@ -245,6 +245,6 @@ internal fun RichMessage.Key.forwardMessage(
|
||||
</item>
|
||||
<source name="${source.take(50)}" icon="" action="" appid="-1"/>
|
||||
</msg>
|
||||
""".trimIndent().replace("\n", " ")
|
||||
""".trimIndent().replace("\n", " ").trim()
|
||||
return ForwardMessageInternal(template, resId)
|
||||
}
|
Loading…
Reference in New Issue
Block a user