@@ -45,8 +45,8 @@ type TelegramService interface {
45
45
}
46
46
47
47
type telegramServiceImpl struct {
48
- config TelegramConfig `json:"-"`
49
- option telegramOptionConfig `json:"-"`
48
+ config TelegramConfig
49
+ option telegramOptionConfig
50
50
}
51
51
52
52
func NewTelegramService (config TelegramConfig , option telegramOptionConfig ) TelegramService {
@@ -280,42 +280,42 @@ func (s *telegramServiceImpl) SendMessageHandshake(request builder.MapBuilder) (
280
280
}
281
281
282
282
func (s * telegramServiceImpl ) SendNotification (topic , message string ) (builder.MapBuilder , error ) {
283
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeNotification ).SetDescription (message ).SetTitle (topic )
283
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeNotification ).SetDescription (message ).SetTitle (topic )
284
284
return s .SendMessage (b .GenCardDefault ())
285
285
}
286
286
287
287
func (s * telegramServiceImpl ) SendInfo (topic , message string ) (builder.MapBuilder , error ) {
288
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeInfo ).SetDescription (message ).SetTitle (topic )
288
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeInfo ).SetDescription (message ).SetTitle (topic )
289
289
return s .SendMessage (b .GenCardDefault ())
290
290
}
291
291
292
292
func (s * telegramServiceImpl ) SendWarning (topic , message string ) (builder.MapBuilder , error ) {
293
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeWarning ).SetDescription (message ).SetTitle (topic )
293
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeWarning ).SetDescription (message ).SetTitle (topic )
294
294
return s .SendMessage (b .GenCardDefault ())
295
295
}
296
296
297
297
func (s * telegramServiceImpl ) SendError (topic , message string ) (builder.MapBuilder , error ) {
298
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeError ).SetDescription (message ).SetTitle (topic )
298
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeError ).SetDescription (message ).SetTitle (topic )
299
299
return s .SendMessage (b .GenCardDefault ())
300
300
}
301
301
302
302
func (s * telegramServiceImpl ) SendDebug (topic , message string ) (builder.MapBuilder , error ) {
303
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeDebug ).SetDescription (message ).SetTitle (topic )
303
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeDebug ).SetDescription (message ).SetTitle (topic )
304
304
return s .SendMessage (b .GenCardDefault ())
305
305
}
306
306
307
307
func (s * telegramServiceImpl ) SendSuccess (topic , message string ) (builder.MapBuilder , error ) {
308
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeSuccess ).SetDescription (message ).SetTitle (topic )
308
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeSuccess ).SetDescription (message ).SetTitle (topic )
309
309
return s .SendMessage (b .GenCardDefault ())
310
310
}
311
311
312
312
func (s * telegramServiceImpl ) SendBug (topic , message string ) (builder.MapBuilder , error ) {
313
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeBug ).SetDescription (message ).SetTitle (topic )
313
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeBug ).SetDescription (message ).SetTitle (topic )
314
314
return s .SendMessage (b .GenCardDefault ())
315
315
}
316
316
317
317
func (s * telegramServiceImpl ) SendTrace (topic , message string ) (builder.MapBuilder , error ) {
318
- b := blueprint .NewCard ( ).SetIconText (blueprint .TypeTrace ).SetDescription (message ).SetTitle (topic )
318
+ b := blueprint .WithCard ( s . option . Timezone ).SetIconText (blueprint .TypeTrace ).SetDescription (message ).SetTitle (topic )
319
319
return s .SendMessage (b .GenCardDefault ())
320
320
}
321
321
0 commit comments