fix: update address timestamp on send mail and refactor TG attachment guard (#896)

fix: update address timestamp on send mail, refactor TG attachment guard

- Call updateAddressUpdatedAt after successful send mail to keep
  address activity timestamp up to date
- Refactor Telegram attachment push: replace early return with if block
  to prevent skipping future logic after attachment section

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dream Hunter
2026-03-14 02:39:18 +08:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 9ee21da8a9
commit e7df77cac0
2 changed files with 26 additions and 23 deletions
+3 -1
View File
@@ -8,7 +8,7 @@ import i18n from '../i18n';
import { CONSTANTS } from '../constants'
import { getJsonSetting, getDomains, getIntValue, getBooleanValue, getStringValue, getJsonObjectValue, getSplitStringListValue } from '../utils';
import { GeoData } from '../models'
import { handleListQuery } from '../common'
import { handleListQuery, updateAddressUpdatedAt } from '../common'
export const api = new Hono<HonoCustomType>()
@@ -222,6 +222,8 @@ export const sendMail = async (
console.warn(`Failed to update balance for ${address}`);
}
}
// update address updated_at
updateAddressUpdatedAt(c, address);
// save to sendbox
try {
const reqIp = c.req.raw.headers.get("cf-connecting-ip")