mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-08-29 03:01:08 +00:00
fix: discord notification timestamp & update notification message (#6894)
This commit is contained in:
@@ -1520,8 +1520,10 @@ class Monitor extends BeanModel {
|
||||
// This makes downtime information available to all notification providers
|
||||
if (bean.status === UP && monitor.id) {
|
||||
try {
|
||||
// Filter by important = 1 to get the state transition heartbeat (e.g. UP→DOWN),
|
||||
// not the most recent DOWN heartbeat which would be the last check before recovery.
|
||||
const lastDownHeartbeat = await R.getRow(
|
||||
"SELECT time FROM heartbeat WHERE monitor_id = ? AND status = ? ORDER BY time DESC LIMIT 1",
|
||||
"SELECT time FROM heartbeat WHERE monitor_id = ? AND status = ? AND important = 1 ORDER BY time DESC LIMIT 1",
|
||||
[monitor.id, DOWN]
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"description": "RDAP bootstrap file for Domain Name System registrations",
|
||||
"publication": "2026-02-10T00:00:01Z",
|
||||
"publication": "2026-02-12T00:00:02Z",
|
||||
"services": [
|
||||
[["kg"], ["http://rdap.cctld.kg/"]],
|
||||
[["mg"], ["http://rdap.nic.mg/"]],
|
||||
@@ -1116,6 +1116,7 @@
|
||||
[["cologne", "koeln", "tirol", "wien"], ["https://rdap.ryce-rsp.com/rdap/"]],
|
||||
[["sg"], ["https://rdap.sgnic.sg/rdap/"]],
|
||||
[["nl"], ["https://rdap.sidn.nl/"]],
|
||||
[["xn--clchc0ea0b2g2a9gcd"], ["https://rdap.ta.sgnic.sg/rdap/"]],
|
||||
[["anquan", "shouji", "xihuan", "xn--vuq861b", "yun"], ["https://rdap.teleinfo.cn/"]],
|
||||
[["xn--3ds443g"], ["https://rdap.teleinfo.cn/xn--3ds443g/"]],
|
||||
[["xn--fiq228c5hs"], ["https://rdap.teleinfo.cn/xn--fiq228c5hs/"]],
|
||||
@@ -1168,6 +1169,7 @@
|
||||
[["xn--imr513n"], ["https://rdap.zdnsgtld.com/xn--imr513n/"]],
|
||||
[["xn--otu796d"], ["https://rdap.zdnsgtld.com/xn--otu796d/"]],
|
||||
[["xn--ses554g"], ["https://rdap.zdnsgtld.com/xn--ses554g/"]],
|
||||
[["xn--yfro4i67o"], ["https://rdap.zh.sgnic.sg/rdap/"]],
|
||||
[["xn--1qqw23a", "xn--55qx5d", "xn--io0a7i", "xn--xhq521b"], ["https://restwhois.ngtld.cn/"]],
|
||||
[["cc"], ["https://tld-rdap.verisign.com/cc/v1/"]],
|
||||
[["comsec"], ["https://tld-rdap.verisign.com/comsec/v1/"]],
|
||||
|
||||
@@ -219,6 +219,11 @@ class Discord extends NotificationProvider {
|
||||
},
|
||||
]
|
||||
: []),
|
||||
// Show server timezone for parity with the DOWN notification embed
|
||||
{
|
||||
name: `Time (${heartbeatJSON["timezone"]})`,
|
||||
value: heartbeatJSON["localDateTime"],
|
||||
},
|
||||
...(heartbeatJSON["ping"] != null
|
||||
? [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user