@@ -5,19 +5,18 @@ import "time"
55type ReminderType string
66
77const (
8- ReminderTypeToday ReminderType = "today"
9- ReminderTypeSoon ReminderType = "soon"
10- ReminderTypeArrive ReminderType = "arrive"
11- ReminderTypeJamaatDelay ReminderType = "jamaat_delay "
8+ ReminderTypeToday ReminderType = "today"
9+ ReminderTypeSoon ReminderType = "soon"
10+ ReminderTypeArrive ReminderType = "arrive"
11+ ReminderTypeJamaat ReminderType = "jamaat "
1212)
1313
1414func (rt ReminderType ) String () string {
1515 return string (rt )
1616}
1717
1818type (
19- JamaatDelay struct {
20- Enabled bool `json:"enabled"`
19+ JamaatDelayConfig struct {
2120 Fajr time.Duration `json:"fajr"`
2221 Shuruq time.Duration `json:"shuruq"`
2322 Dhuhr time.Duration `json:"dhuhr"`
@@ -26,21 +25,26 @@ type (
2625 Isha time.Duration `json:"isha"`
2726 }
2827
28+ JamaatConfig struct {
29+ Enabled bool `json:"enabled"`
30+ Delay * JamaatDelayConfig `json:"delay"`
31+ }
32+
2933 ReminderConfig struct {
3034 Offset time.Duration `json:"offset"`
3135 MessageID int `json:"message_id"`
3236 LastAt time.Time `json:"last_at"`
3337 }
3438
3539 Reminder struct {
36- Today * ReminderConfig `json:"today"`
37- Soon * ReminderConfig `json:"soon"`
38- Arrive * ReminderConfig `json:"arrive"`
39- JamaatDelay * JamaatDelay `json:"jamaat_delay "`
40+ Today * ReminderConfig `json:"today"`
41+ Soon * ReminderConfig `json:"soon"`
42+ Arrive * ReminderConfig `json:"arrive"`
43+ Jamaat * JamaatConfig `json:"jamaat "`
4044 }
4145)
4246
43- func (j * JamaatDelay ) GetDelayByPrayerID (prayerID PrayerID ) time.Duration {
47+ func (j * JamaatDelayConfig ) GetDelayByPrayerID (prayerID PrayerID ) time.Duration {
4448 switch prayerID {
4549 case PrayerIDFajr :
4650 return j .Fajr
0 commit comments