mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-04 06:00:11 +00:00
修复:通过转发日志中重试发送/重新匹配规则并发送消息时,{{接收时间}}错误(取当前时间) #275
This commit is contained in:
parent
9a0861ded3
commit
a0c3ead33e
@ -19,14 +19,13 @@ import com.idormy.sms.forwarder.workers.SendWorker
|
||||
import com.idormy.sms.forwarder.workers.UpdateLogsWorker
|
||||
import com.xuexiang.xui.utils.ResUtils
|
||||
import com.xuexiang.xutil.XUtil
|
||||
import java.util.*
|
||||
|
||||
object SendUtils {
|
||||
private const val TAG = "SendUtils"
|
||||
|
||||
//重新匹配规则并发送消息
|
||||
fun rematchSendMsg(item: MsgAndLogs) {
|
||||
val msgInfo = MsgInfo(item.msg.type, item.msg.from, item.msg.content, Date(), item.msg.simInfo, item.msg.simSlot, item.msg.subId)
|
||||
val msgInfo = MsgInfo(item.msg.type, item.msg.from, item.msg.content, item.msg.time, item.msg.simInfo, item.msg.simSlot, item.msg.subId)
|
||||
Log.d(TAG, "msgInfo = $msgInfo")
|
||||
|
||||
val request = OneTimeWorkRequestBuilder<SendWorker>().setInputData(
|
||||
@ -41,7 +40,7 @@ object SendUtils {
|
||||
fun retrySendMsg(logId: Long) {
|
||||
val item = Core.logs.getOne(logId)
|
||||
|
||||
val msgInfo = MsgInfo(item.msg.type, item.msg.from, item.msg.content, Date(), item.msg.simInfo, item.msg.simSlot, item.msg.subId)
|
||||
val msgInfo = MsgInfo(item.msg.type, item.msg.from, item.msg.content, item.msg.time, item.msg.simInfo, item.msg.simSlot, item.msg.subId)
|
||||
Log.d(TAG, "msgInfo = $msgInfo")
|
||||
|
||||
var senderIndex = 0
|
||||
|
Loading…
Reference in New Issue
Block a user