mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 05:12:17 +00:00
Compare commits
2 Commits
b9cfe73eae
...
e92b04ad0f
Author | SHA1 | Date | |
---|---|---|---|
e92b04ad0f | |||
160d1a11ac |
@ -31,10 +31,6 @@ import kotlin.coroutines.resume
|
|||||||
import kotlin.coroutines.suspendCoroutine
|
import kotlin.coroutines.suspendCoroutine
|
||||||
|
|
||||||
internal object MsgSvc: BaseSvc() {
|
internal object MsgSvc: BaseSvc() {
|
||||||
fun uploadForwardMsg(): Result<String> {
|
|
||||||
return Result.failure(Exception("Not implemented"))
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun prepareTempChatFromGroup(
|
suspend fun prepareTempChatFromGroup(
|
||||||
groupId: String,
|
groupId: String,
|
||||||
peerId: String
|
peerId: String
|
||||||
|
@ -9,16 +9,17 @@ internal object SendGroupMessage: IActionHandler() {
|
|||||||
override suspend fun internalHandle(session: ActionSession): String {
|
override suspend fun internalHandle(session: ActionSession): String {
|
||||||
val groupId = session.getString("group_id")
|
val groupId = session.getString("group_id")
|
||||||
val retryCnt = session.getIntOrNull("retry_cnt")
|
val retryCnt = session.getIntOrNull("retry_cnt")
|
||||||
|
val recallDuration = session.getLongOrNull("recall_duration")
|
||||||
return if (session.isString("message")) {
|
return if (session.isString("message")) {
|
||||||
val autoEscape = session.getBooleanOrDefault("auto_escape", false)
|
val autoEscape = session.getBooleanOrDefault("auto_escape", false)
|
||||||
val message = session.getString("message")
|
val message = session.getString("message")
|
||||||
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, message, autoEscape, echo = session.echo, retryCnt = retryCnt ?: 3)
|
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, message, autoEscape, echo = session.echo, retryCnt = retryCnt ?: 3, recallDuration = recallDuration)
|
||||||
} else if (session.isObject("message")) {
|
} else if (session.isObject("message")) {
|
||||||
val message = session.getObject("message")
|
val message = session.getObject("message")
|
||||||
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, listOf( message ).jsonArray, session.echo, retryCnt = retryCnt ?: 3)
|
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, listOf( message ).jsonArray, session.echo, retryCnt = retryCnt ?: 3, recallDuration = recallDuration)
|
||||||
} else {
|
} else {
|
||||||
val message = session.getArray("message")
|
val message = session.getArray("message")
|
||||||
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, message, session.echo, retryCnt = retryCnt ?: 3)
|
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, message, session.echo, retryCnt = retryCnt ?: 3, recallDuration = recallDuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package moe.fuqiuluo.shamrock.remote.action.handlers
|
package moe.fuqiuluo.shamrock.remote.action.handlers
|
||||||
|
|
||||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.GlobalScope
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
import moe.fuqiuluo.shamrock.remote.action.ActionSession
|
import moe.fuqiuluo.shamrock.remote.action.ActionSession
|
||||||
import moe.fuqiuluo.shamrock.remote.action.IActionHandler
|
import moe.fuqiuluo.shamrock.remote.action.IActionHandler
|
||||||
import moe.fuqiuluo.shamrock.helper.MessageHelper
|
import moe.fuqiuluo.shamrock.helper.MessageHelper
|
||||||
@ -46,16 +50,17 @@ internal object SendMessage: IActionHandler() {
|
|||||||
else -> error("unknown chat type: $chatType")
|
else -> error("unknown chat type: $chatType")
|
||||||
}
|
}
|
||||||
val retryCnt = session.getIntOrNull("retry_cnt")
|
val retryCnt = session.getIntOrNull("retry_cnt")
|
||||||
|
val recallDuration = session.getLongOrNull("recall_duration")
|
||||||
return if (session.isString("message")) {
|
return if (session.isString("message")) {
|
||||||
val autoEscape = session.getBooleanOrDefault("auto_escape", false)
|
val autoEscape = session.getBooleanOrDefault("auto_escape", false)
|
||||||
val message = session.getString("message")
|
val message = session.getString("message")
|
||||||
invoke(chatType, peerId, message, autoEscape, echo = session.echo, fromId = fromId, retryCnt = retryCnt ?: 3)
|
invoke(chatType, peerId, message, autoEscape, echo = session.echo, fromId = fromId, retryCnt = retryCnt ?: 3, recallDuration = recallDuration)
|
||||||
} else if (session.isArray("message")) {
|
} else if (session.isArray("message")) {
|
||||||
val message = session.getArray("message")
|
val message = session.getArray("message")
|
||||||
invoke(chatType, peerId, message, session.echo, fromId = fromId, retryCnt ?: 3)
|
invoke(chatType, peerId, message, session.echo, fromId = fromId, retryCnt ?: 3, recallDuration = recallDuration)
|
||||||
} else {
|
} else {
|
||||||
val message = session.getObject("message")
|
val message = session.getObject("message")
|
||||||
invoke(chatType, peerId, listOf( message ).jsonArray, session.echo, fromId = fromId, retryCnt ?: 3)
|
invoke(chatType, peerId, listOf( message ).jsonArray, session.echo, fromId = fromId, retryCnt ?: 3, recallDuration = recallDuration)
|
||||||
}
|
}
|
||||||
} catch (e: ParamsException) {
|
} catch (e: ParamsException) {
|
||||||
return noParam(e.message!!, session.echo)
|
return noParam(e.message!!, session.echo)
|
||||||
@ -72,6 +77,7 @@ internal object SendMessage: IActionHandler() {
|
|||||||
autoEscape: Boolean,
|
autoEscape: Boolean,
|
||||||
fromId: String = peerId,
|
fromId: String = peerId,
|
||||||
retryCnt: Int,
|
retryCnt: Int,
|
||||||
|
recallDuration: Long?,
|
||||||
echo: JsonElement = EmptyJsonString
|
echo: JsonElement = EmptyJsonString
|
||||||
): String {
|
): String {
|
||||||
//if (!ContactHelper.checkContactAvailable(chatType, peerId)) {
|
//if (!ContactHelper.checkContactAvailable(chatType, peerId)) {
|
||||||
@ -102,6 +108,7 @@ internal object SendMessage: IActionHandler() {
|
|||||||
if (pair.first <= 0) {
|
if (pair.first <= 0) {
|
||||||
return logic("send message failed", echo = echo)
|
return logic("send message failed", echo = echo)
|
||||||
}
|
}
|
||||||
|
recallDuration?.let { autoRecall(pair.second, it) }
|
||||||
return ok(MessageResult(
|
return ok(MessageResult(
|
||||||
msgId = pair.second,
|
msgId = pair.second,
|
||||||
time = (pair.first * 0.001).toLong()
|
time = (pair.first * 0.001).toLong()
|
||||||
@ -110,7 +117,7 @@ internal object SendMessage: IActionHandler() {
|
|||||||
|
|
||||||
// 消息段格式消息
|
// 消息段格式消息
|
||||||
suspend operator fun invoke(
|
suspend operator fun invoke(
|
||||||
chatType: Int, peerId: String, message: JsonArray, echo: JsonElement = EmptyJsonString, fromId: String = peerId, retryCnt: Int
|
chatType: Int, peerId: String, message: JsonArray, echo: JsonElement = EmptyJsonString, fromId: String = peerId, retryCnt: Int, recallDuration: Long?,
|
||||||
): String {
|
): String {
|
||||||
//if (!ContactHelper.checkContactAvailable(chatType, peerId)) {
|
//if (!ContactHelper.checkContactAvailable(chatType, peerId)) {
|
||||||
// return logic("contact is not found", echo = echo)
|
// return logic("contact is not found", echo = echo)
|
||||||
@ -123,12 +130,20 @@ internal object SendMessage: IActionHandler() {
|
|||||||
if (pair.first <= 0) {
|
if (pair.first <= 0) {
|
||||||
return logic("send message failed", echo = echo)
|
return logic("send message failed", echo = echo)
|
||||||
}
|
}
|
||||||
|
recallDuration?.let { autoRecall(pair.second, it) }
|
||||||
return ok(MessageResult(
|
return ok(MessageResult(
|
||||||
msgId = pair.second,
|
msgId = pair.second,
|
||||||
time = (pair.first * 0.001).toLong()
|
time = (pair.first * 0.001).toLong()
|
||||||
), echo)
|
), echo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun autoRecall(msgHash: Int, duration: Long) {
|
||||||
|
GlobalScope.launch(Dispatchers.Default) {
|
||||||
|
delay(duration)
|
||||||
|
MsgSvc.recallMsg(msgHash)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override val requiredParams: Array<String> = arrayOf("message")
|
override val requiredParams: Array<String> = arrayOf("message")
|
||||||
|
|
||||||
override fun path(): String = "send_message"
|
override fun path(): String = "send_message"
|
||||||
|
@ -11,6 +11,7 @@ internal object SendPrivateMessage: IActionHandler() {
|
|||||||
val groupId = session.getStringOrNull("group_id")
|
val groupId = session.getStringOrNull("group_id")
|
||||||
val chatType = if (groupId == null) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPETEMPC2CFROMGROUP
|
val chatType = if (groupId == null) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPETEMPC2CFROMGROUP
|
||||||
val retryCnt = session.getIntOrNull("retry_cnt")
|
val retryCnt = session.getIntOrNull("retry_cnt")
|
||||||
|
val recallDuration = session.getLongOrNull("recall_duration")
|
||||||
return if (session.isString("message")) {
|
return if (session.isString("message")) {
|
||||||
val autoEscape = session.getBooleanOrDefault("auto_escape", false)
|
val autoEscape = session.getBooleanOrDefault("auto_escape", false)
|
||||||
val message = session.getString("message")
|
val message = session.getString("message")
|
||||||
@ -21,7 +22,8 @@ internal object SendPrivateMessage: IActionHandler() {
|
|||||||
autoEscape = autoEscape,
|
autoEscape = autoEscape,
|
||||||
echo = session.echo,
|
echo = session.echo,
|
||||||
fromId = groupId ?: userId,
|
fromId = groupId ?: userId,
|
||||||
retryCnt = retryCnt ?: 3
|
retryCnt = retryCnt ?: 3,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
} else if (session.isArray("message")) {
|
} else if (session.isArray("message")) {
|
||||||
val message = session.getArray("message")
|
val message = session.getArray("message")
|
||||||
@ -31,7 +33,8 @@ internal object SendPrivateMessage: IActionHandler() {
|
|||||||
message = message,
|
message = message,
|
||||||
echo = session.echo,
|
echo = session.echo,
|
||||||
fromId = groupId ?: userId,
|
fromId = groupId ?: userId,
|
||||||
retryCnt = retryCnt ?: 3
|
retryCnt = retryCnt ?: 3,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
val message = session.getObject("message")
|
val message = session.getObject("message")
|
||||||
@ -41,7 +44,8 @@ internal object SendPrivateMessage: IActionHandler() {
|
|||||||
message = listOf( message ).jsonArray,
|
message = listOf( message ).jsonArray,
|
||||||
echo = session.echo,
|
echo = session.echo,
|
||||||
fromId = groupId ?: userId,
|
fromId = groupId ?: userId,
|
||||||
retryCnt = retryCnt ?: 3
|
retryCnt = retryCnt ?: 3,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,13 +120,16 @@ fun Routing.messageAction() {
|
|||||||
val userId = fetchGetOrNull("user_id")
|
val userId = fetchGetOrNull("user_id")
|
||||||
val groupId = fetchGetOrNull("group_id")
|
val groupId = fetchGetOrNull("group_id")
|
||||||
|
|
||||||
|
val recallDuration = fetchGetOrNull("recall_duration")?.toLongOrNull()
|
||||||
|
|
||||||
call.respondText(SendMessage(
|
call.respondText(SendMessage(
|
||||||
chatType = chatType,
|
chatType = chatType,
|
||||||
peerId = if (chatType == MsgConstant.KCHATTYPEC2C) userId!! else groupId!!,
|
peerId = if (chatType == MsgConstant.KCHATTYPEC2C) userId!! else groupId!!,
|
||||||
message = message,
|
message = message,
|
||||||
autoEscape = autoEscape,
|
autoEscape = autoEscape,
|
||||||
fromId = groupId ?: userId ?: "",
|
fromId = groupId ?: userId ?: "",
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt,
|
||||||
|
recallDuration = recallDuration
|
||||||
), ContentType.Application.Json)
|
), ContentType.Application.Json)
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
@ -137,6 +140,7 @@ fun Routing.messageAction() {
|
|||||||
val userId = fetchPostOrNull("user_id")
|
val userId = fetchPostOrNull("user_id")
|
||||||
val groupId = fetchPostOrNull("group_id")
|
val groupId = fetchPostOrNull("group_id")
|
||||||
val peerId = if (chatType == MsgConstant.KCHATTYPEC2C) userId!! else groupId!!
|
val peerId = if (chatType == MsgConstant.KCHATTYPEC2C) userId!! else groupId!!
|
||||||
|
val recallDuration = fetchPostOrNull("recall_duration")?.toLongOrNull()
|
||||||
|
|
||||||
call.respondText(if (isJsonData() && !isJsonString("message")) {
|
call.respondText(if (isJsonData() && !isJsonString("message")) {
|
||||||
if (isJsonObject("message")) {
|
if (isJsonObject("message")) {
|
||||||
@ -145,7 +149,8 @@ fun Routing.messageAction() {
|
|||||||
peerId = peerId,
|
peerId = peerId,
|
||||||
message = listOf(fetchPostJsonObject("message")).jsonArray,
|
message = listOf(fetchPostJsonObject("message")).jsonArray,
|
||||||
fromId = groupId ?: userId ?: "",
|
fromId = groupId ?: userId ?: "",
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
SendMessage(
|
SendMessage(
|
||||||
@ -153,7 +158,8 @@ fun Routing.messageAction() {
|
|||||||
peerId = peerId,
|
peerId = peerId,
|
||||||
message = fetchPostJsonArray("message"),
|
message = fetchPostJsonArray("message"),
|
||||||
fromId = groupId ?: userId ?: "",
|
fromId = groupId ?: userId ?: "",
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -165,7 +171,8 @@ fun Routing.messageAction() {
|
|||||||
message = fetchPostOrThrow("message"),
|
message = fetchPostOrThrow("message"),
|
||||||
autoEscape = autoEscape,
|
autoEscape = autoEscape,
|
||||||
fromId = groupId ?: userId ?: "",
|
fromId = groupId ?: userId ?: "",
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
}, ContentType.Application.Json)
|
}, ContentType.Application.Json)
|
||||||
}
|
}
|
||||||
@ -177,36 +184,41 @@ fun Routing.messageAction() {
|
|||||||
val message = fetchGetOrThrow("message")
|
val message = fetchGetOrThrow("message")
|
||||||
val retryCnt = fetchGetOrNull("retry_cnt")?.toInt() ?: 3
|
val retryCnt = fetchGetOrNull("retry_cnt")?.toInt() ?: 3
|
||||||
val autoEscape = fetchGetOrNull("auto_escape")?.toBooleanStrict() ?: false
|
val autoEscape = fetchGetOrNull("auto_escape")?.toBooleanStrict() ?: false
|
||||||
call.respondText(SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, message, autoEscape, retryCnt = retryCnt))
|
val recallDuration = fetchGetOrNull("recall_duration")?.toLongOrNull()
|
||||||
|
|
||||||
|
call.respondText(SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, message, autoEscape, retryCnt = retryCnt, recallDuration = recallDuration), ContentType.Application.Json)
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
val groupId = fetchPostOrThrow("group_id")
|
val groupId = fetchPostOrThrow("group_id")
|
||||||
|
|
||||||
val retryCnt = fetchPostOrNull("retry_cnt")?.toInt() ?: 3
|
val retryCnt = fetchPostOrNull("retry_cnt")?.toInt() ?: 3
|
||||||
val autoEscape = fetchPostOrNull("auto_escape")?.toBooleanStrict() ?: false
|
val autoEscape = fetchPostOrNull("auto_escape")?.toBooleanStrict() ?: false
|
||||||
|
val recallDuration = fetchPostOrNull("recall_duration")?.toLongOrNull()
|
||||||
|
|
||||||
val result = if (isJsonData()) {
|
val result = if (isJsonData()) {
|
||||||
if (isJsonString("message")) {
|
if (isJsonString("message")) {
|
||||||
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, fetchPostJsonString("message"), autoEscape, retryCnt = retryCnt)
|
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, fetchPostJsonString("message"), autoEscape, retryCnt = retryCnt, recallDuration = recallDuration)
|
||||||
} else {
|
} else {
|
||||||
if (isJsonObject("message")) {
|
if (isJsonObject("message")) {
|
||||||
SendMessage(
|
SendMessage(
|
||||||
chatType = MsgConstant.KCHATTYPEGROUP,
|
chatType = MsgConstant.KCHATTYPEGROUP,
|
||||||
peerId = groupId,
|
peerId = groupId,
|
||||||
message = listOf(fetchPostJsonObject("message")).jsonArray,
|
message = listOf(fetchPostJsonObject("message")).jsonArray,
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
SendMessage(
|
SendMessage(
|
||||||
chatType = MsgConstant.KCHATTYPEGROUP,
|
chatType = MsgConstant.KCHATTYPEGROUP,
|
||||||
peerId = groupId,
|
peerId = groupId,
|
||||||
message = fetchPostJsonArray("message"),
|
message = fetchPostJsonArray("message"),
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt,
|
||||||
|
recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, fetchPostOrThrow("message"), autoEscape, retryCnt = retryCnt)
|
SendMessage(MsgConstant.KCHATTYPEGROUP, groupId, fetchPostOrThrow("message"), autoEscape, retryCnt = retryCnt, recallDuration = recallDuration)
|
||||||
}
|
}
|
||||||
|
|
||||||
call.respondText(result, ContentType.Application.Json)
|
call.respondText(result, ContentType.Application.Json)
|
||||||
@ -220,13 +232,14 @@ fun Routing.messageAction() {
|
|||||||
val message = fetchGetOrThrow("message")
|
val message = fetchGetOrThrow("message")
|
||||||
val retryCnt = fetchGetOrNull("retry_cnt")?.toInt() ?: 3
|
val retryCnt = fetchGetOrNull("retry_cnt")?.toInt() ?: 3
|
||||||
val autoEscape = fetchGetOrNull("auto_escape")?.toBooleanStrict() ?: false
|
val autoEscape = fetchGetOrNull("auto_escape")?.toBooleanStrict() ?: false
|
||||||
|
val recallDuration = fetchGetOrNull("recall_duration")?.toLongOrNull()
|
||||||
call.respondText(SendMessage(
|
call.respondText(SendMessage(
|
||||||
chatType = if (groupId == null) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPETEMPC2CFROMGROUP,
|
chatType = if (groupId == null) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPETEMPC2CFROMGROUP,
|
||||||
peerId = userId,
|
peerId = userId,
|
||||||
message = message,
|
message = message,
|
||||||
autoEscape = autoEscape,
|
autoEscape = autoEscape,
|
||||||
fromId = groupId ?: userId,
|
fromId = groupId ?: userId,
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt, recallDuration = recallDuration
|
||||||
), ContentType.Application.Json)
|
), ContentType.Application.Json)
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
@ -237,7 +250,7 @@ fun Routing.messageAction() {
|
|||||||
|
|
||||||
val chatType = if (groupId == null) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPETEMPC2CFROMGROUP
|
val chatType = if (groupId == null) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPETEMPC2CFROMGROUP
|
||||||
val fromId = groupId ?: userId
|
val fromId = groupId ?: userId
|
||||||
|
val recallDuration = fetchPostOrNull("recall_duration")?.toLongOrNull()
|
||||||
|
|
||||||
val result = if (isJsonData()) {
|
val result = if (isJsonData()) {
|
||||||
if (isJsonString("message")) {
|
if (isJsonString("message")) {
|
||||||
@ -247,7 +260,7 @@ fun Routing.messageAction() {
|
|||||||
message = fetchPostJsonString("message"),
|
message = fetchPostJsonString("message"),
|
||||||
autoEscape = autoEscape,
|
autoEscape = autoEscape,
|
||||||
fromId = fromId,
|
fromId = fromId,
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt, recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
if (isJsonObject("message")) {
|
if (isJsonObject("message")) {
|
||||||
@ -256,7 +269,7 @@ fun Routing.messageAction() {
|
|||||||
peerId = userId,
|
peerId = userId,
|
||||||
message = listOf(fetchPostJsonObject("message")).jsonArray,
|
message = listOf(fetchPostJsonObject("message")).jsonArray,
|
||||||
fromId = fromId,
|
fromId = fromId,
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt, recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
SendMessage(
|
SendMessage(
|
||||||
@ -264,7 +277,7 @@ fun Routing.messageAction() {
|
|||||||
peerId = userId,
|
peerId = userId,
|
||||||
message = fetchPostJsonArray("message"),
|
message = fetchPostJsonArray("message"),
|
||||||
fromId = fromId,
|
fromId = fromId,
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt, recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -275,7 +288,7 @@ fun Routing.messageAction() {
|
|||||||
message = fetchPostOrThrow("message"),
|
message = fetchPostOrThrow("message"),
|
||||||
autoEscape = autoEscape,
|
autoEscape = autoEscape,
|
||||||
fromId = fromId,
|
fromId = fromId,
|
||||||
retryCnt = retryCnt
|
retryCnt = retryCnt, recallDuration = recallDuration
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user