吃药提醒消息 pin 支持添加

This commit is contained in:
A.C.Sukazyo Eyre 2022-05-31 11:41:02 +08:00
parent 07d864fb5d
commit b35b0600dc
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD
3 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
## Core ## Core
VERSION = 0.7.0.14 VERSION = 0.7.0.15
CODENAME = fuzhou CODENAME = fuzhou

View File

@ -4,7 +4,7 @@ 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.14"; public static final String VERSION = "0.7.0.15";
public static final String CODENAME = "fuzhou"; public static final String CODENAME = "fuzhou";
public static final long COMPILE_TIMESTAMP = 1653924732379L; public static final long COMPILE_TIMESTAMP = 1653968380239L;
} }

View File

@ -2,7 +2,9 @@ package cc.sukazyo.cono.morny.daemon;
import cc.sukazyo.cono.morny.MornyCoeur; import cc.sukazyo.cono.morny.MornyCoeur;
import cc.sukazyo.cono.morny.data.TelegramStickers; import cc.sukazyo.cono.morny.data.TelegramStickers;
import com.pengrad.telegrambot.request.PinChatMessage;
import com.pengrad.telegrambot.request.SendSticker; import com.pengrad.telegrambot.request.SendSticker;
import com.pengrad.telegrambot.response.SendResponse;
import static cc.sukazyo.cono.morny.Log.logger; import static cc.sukazyo.cono.morny.Log.logger;
@ -33,7 +35,8 @@ public class MedicationTimer extends Thread {
} }
private static void sendNotification () { private static void sendNotification () {
MornyCoeur.extra().exec(new SendSticker(NOTIFY_RECEIVE_CHAT, TelegramStickers.ID_PROGYNOVA)); SendResponse m = MornyCoeur.extra().exec(new SendSticker(NOTIFY_RECEIVE_CHAT, TelegramStickers.ID_PROGYNOVA));
if (m.isOk()) MornyCoeur.extra().exec(new PinChatMessage(NOTIFY_RECEIVE_CHAT, m.message().messageId()));
} }
private static long calcNextRoutineTimestamp () { private static long calcNextRoutineTimestamp () {