-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/detect broken contacts (#615)
* Added notifier error to describe broken contact * Catch broken contact for telegram sender * fix * Catch broken contacts for slack sender * Added more telegram cases to broken contact * lint fix * review fixes * fix telegram sender detecting broken contacts * Added test: no send repeats for broken contacts * review fixes Co-authored-by: Andrey Kolkov <[email protected]>
- Loading branch information
Showing
6 changed files
with
95 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package moira | ||
|
||
//SenderBrokenContactError means than sender has no way to send message to contact. | ||
// Maybe receive contact was deleted, blocked or archived. | ||
type SenderBrokenContactError struct { | ||
SenderError error | ||
} | ||
|
||
func NewSenderBrokenContactError(senderError error) SenderBrokenContactError { | ||
return SenderBrokenContactError{ | ||
SenderError: senderError, | ||
} | ||
} | ||
|
||
func (e SenderBrokenContactError) Error() string { | ||
return e.SenderError.Error() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters