为 *msgsend 添加发送成功信号回显,修复一个分支故障

This commit is contained in:
A.C.Sukazyo Eyre 2022-05-22 14:07:39 +08:00
parent 729d3fdd47
commit ce83e3284d
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD
3 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,6 @@
## Core ## Core
VERSION = 0.7.0.8 VERSION = 0.7.0.9
# dependencies # dependencies

View File

@ -4,6 +4,6 @@ package cc.sukazyo.cono.morny;
* the final field that will be updated by gradle automatically. * the final field that will be updated by gradle automatically.
*/ */
public class GradleProjectConfigures { public class GradleProjectConfigures {
public static final String VERSION = "0.7.0.8"; public static final String VERSION = "0.7.0.9";
public static final long COMPILE_TIMESTAMP = 1653132713941L; public static final long COMPILE_TIMESTAMP = 1653199608824L;
} }

View File

@ -74,6 +74,11 @@ public class OnCallMsgSend extends EventListener {
sendResponse.description() sendResponse.description()
) )
).replyToMessageId(update.message().messageId()).parseMode(ParseMode.HTML)); ).replyToMessageId(update.message().messageId()).parseMode(ParseMode.HTML));
} else { // 发送成功信号
MornyCoeur.extra().exec(new SendSticker(
update.message().chat().id(),
TelegramStickers.ID_SENT
).replyToMessageId(update.message().messageId()));
} }
return true; return true;
// 发送完成/失败 - 事件结束 // 发送完成/失败 - 事件结束
@ -109,7 +114,7 @@ public class OnCallMsgSend extends EventListener {
targetChatReq.description() targetChatReq.description()
) )
).replyToMessageId(update.message().messageId()).parseMode(ParseMode.HTML)); ).replyToMessageId(update.message().messageId()).parseMode(ParseMode.HTML));
} { } else {
MornyCoeur.extra().exec(new SendMessage( MornyCoeur.extra().exec(new SendMessage(
update.message().chat().id(), update.message().chat().id(),
targetChatReq.chat().type() == Chat.Type.Private ? ( targetChatReq.chat().type() == Chat.Type.Private ? (