feat: telegram mini app open mail from bot (#256)

This commit is contained in:
Dream Hunter
2024-05-21 02:03:06 +08:00
committed by GitHub
parent 69771fc1d1
commit 91d7896e65
21 changed files with 487 additions and 151 deletions
+32
View File
@@ -38,3 +38,35 @@ export class CleanupSettings {
this.cleanSendBoxDays = cleanSendBoxDays || 0;
}
}
export class GeoData {
ip: string;
country: string | undefined;
city: string | undefined;
timezone: string | undefined;
postalCode: string | undefined;
region: string | undefined;
latitude: number | undefined;
longitude: number | undefined;
regionCode: string | undefined;
asOrganization: string | undefined;
constructor(ip: string | null, data: GeoData | undefined | null) {
const {
country, city, timezone, postalCode, region,
latitude, longitude, regionCode, asOrganization
} = data || {};
this.ip = ip || "unknown";
this.country = country;
this.city = city;
this.timezone = timezone;
this.postalCode = postalCode;
this.region = region;
this.latitude = latitude;
this.longitude = longitude;
this.regionCode = regionCode;
this.asOrganization = asOrganization;
}
}