Commit Graph
111 Commits
Author SHA1 Message Date
rainzm b31f69926c feat(notify): show only users under the domain in the recipient details of the message 2021-01-14 18:25:51 +08:00
rainzm c891169384 fix(notify): be compatible with webconsole type hack 2021-01-14 18:25:51 +08:00
rainzm cafe1d7b53 feat(notify): mandatory update of VERIFY and USER_LOGIN_EXCEPTION templates 2021-01-14 18:25:51 +08:00
rainzm d28a12d6e7 feat(notify): change default verify expire interval 5m => 2m 2021-01-14 14:25:35 +08:00
rainzm 8c717e1ae6 fix(notify): update receiver's lang when update event occurs 2021-01-14 14:25:35 +08:00
rainzm 36853a6cf2 fix(notify): panic for err 2021-01-14 14:25:35 +08:00
rainzm f9fa70d32a feat(notify): add params for create notification
1. tag, usually used to filter
2. metadata
3. ignore_nonexistent_receiver
2021-01-13 20:01:12 +08:00
rainzm 9a9c9acb8e fix(notify): set status after sending 2021-01-13 15:48:44 +08:00
rainzm bb7b179c4e fix(notify): set ModelManager in Receiver() 2021-01-13 09:55:46 +08:00
rainzm ebc32e693d feat(notify): send notifications of different templates according to language 2021-01-11 19:43:18 +08:00
rainzm 78c16bfc03 fix(notify): avoid duplication of notification names 2021-01-09 18:45:50 +08:00
rainzm 9503546d0d fix(notify): loose phone number rules in updating receiver 2021-01-09 11:31:53 +08:00
rainzm 50c8636cec fix(notify): loose mobile phone number matching rules 2021-01-08 12:02:22 +08:00
rainzm ac8f20ca18 fix(notify): inject domain info in ReceiverManager.FetchOwnerId 2020-12-29 15:01:34 +08:00
rainzm 4f386fea1a fix(notify): fit correctly when send notification via contact 2020-12-23 17:46:48 +08:00
rainzm 54ed4b6194 fix(notify): avoid deadlock 2020-12-14 15:02:19 +08:00
Zexi Li 3f194b4ccf Merge pull request #9325 from rainzm/notify/config_change
Try to repull contacts when changing notify config
2020-12-10 17:22:06 +08:00
rainzm 75998a132b fix(notify): repull subcontact after changing config 2020-12-10 10:15:19 +08:00
rainzm 5bc847f052 fix(notify): check for changes before updating config 2020-12-10 10:11:22 +08:00
rainzm aabb200585 refactor(notify): add StartSubcontactPullTask for receiver 2020-12-10 10:09:41 +08:00
rainzm 6ed0b5e9fa feat(notify): add intellij-get for receiver 2020-12-09 16:45:23 +08:00
rainzm 8aeda8f841 feat(notify): add webconsole in enabled contact types 2020-12-07 19:10:30 +08:00
Zexi Li 5d63c907cf Merge pull request #9104 from rainzm/notify/second_try
fix(notify): return the result of the second attempt to execute the rpc call
2020-12-01 21:03:11 +08:00
rainzm 4135b3729b fix(notify): return the result of the second attempt to execute the rpc call 2020-12-01 14:35:04 +08:00
rainzm 3ba52355b8 feat(notify): permit admin sending notification via contact
In this way, you can easily send notification to non-existent receiver.
2020-11-30 17:45:48 +08:00
rainzm a4dc42e69a feat(notify): enable watching user in keystone 2020-11-17 16:34:08 +08:00
rainzm 7ed99506a5 fix(notify): be compatible with keystone's UsersV3.GetById
Fill UsersV3.GetById with user's name, it will return user's info.
2020-11-17 16:15:06 +08:00
rainzm fbc951330c fix(notify): add AllOkContactTypes in where permanently enabled and verified ContactType 2020-10-20 20:29:21 +08:00
rainzm 2e094a310a feat(notify): allow empty receivers for robot or webhook contact type 2020-10-19 11:56:50 +08:00
rainzm 012d9b1588 feat(notify): support webhook contact type 2020-10-17 18:03:19 +08:00
rainzm 0879278714 fix(notify): modify name of notification to avoid duplication 2020-09-22 20:17:39 +08:00
rainzm e47f8a8960 fix(notify): clean verifyNote when mark verified 2020-09-22 20:13:12 +08:00
rainzm c522b45242 fix(notify): return correct value when sortContactType 2020-09-22 20:13:11 +08:00
rainzm 5bfc3128c3 fix(notify): allow normal user create their receiver 2020-09-18 17:14:21 +08:00
rainzm 77bbb2cfd0 feat(notify): sort the returned contact type array 2020-09-14 20:33:42 +08:00
rainzm 1517ed79f2 fix(notify): pull contact for workwx, dingtalk and feishu 2020-09-10 14:33:09 +08:00
rainzm a9fafc4517 fix(notify): break down permissions of notifyconfigs
1. Only allow admin to create, list, update or delete.
2. Allow user to get types.
2020-09-07 18:55:19 +08:00
rainzm 0a9a73587e feat(notify): Allow use topic to filter notification 2020-09-03 21:15:38 +08:00
rainzm 89ec96567b feat(notify): replace VerifiedContactTypes with VerifiedInfos in ReceiverDetails
VerifiedInfos will provide Note to display.
2020-09-03 15:08:13 +08:00
rainzm e179191dd3 feat(notify): Support trigger-verify for feishu, dingtalk and workwx 2020-09-03 15:08:13 +08:00
rainzm 3e982ab79a feat(notify): Add VerifiedNote for SSubContact
VerifiedNote will be 'ok' if SSubContact verified successfully.
Otherwise, there will be there value for VerifiedNote:
1. no such mobile: mobile is not exist, change and try again.
2. incomplete config: tell admin to improve the configuration.
3. service exceptions: try again or connect to admin.
2020-09-03 15:08:13 +08:00
rainzm bf12f5b57c feat(notify): break down error from UseridByMobile 2020-09-03 15:08:13 +08:00
rainzm 9af0fe1fe9 fix(notify): Set default priority 'normal' when creating notification 2020-09-03 15:08:13 +08:00
rainzm 9029e98c2f fix(notify): Mark verified not enabled in MarkContactTypeVerified 2020-09-03 15:08:13 +08:00
rainzm 8a80f96d62 refactor(notify): hide SSunContact webconsole
Every receiver has webconsole type contact that is equal with
receiverid.
Now, make webconsole invisible, and it does exist.
2020-09-03 15:08:13 +08:00
rainzm 2ea4138f3a fix(notify): Allow user list receivers 2020-09-03 15:08:13 +08:00
rainzm 9978f19542 fix(notify): use AfterSend for contact with succuessful sending 2020-09-03 15:08:13 +08:00
Rain Zheng 1ed65ddd1a Feature & Fix for Notify (#7714)
* feat(notify): Add 'get-types' action for ConfigManager

The List interface is only open to administrators,
because we don't want anyone other than administrators
to see the details of the notify configuration.
To let general user to kown available notification channels,
add 'get-types' actions of ConfigManager.

* feat(notify): Check the availability of contact type before creating notification

Creating notification with unconfigured contact type will fail at
sending message. Now, prevent creation in advance.

* feat(notify): Add workwx for NotifyNormal/Important/Critical

* feat(notify): Add Notify about robot in notifyclient

* fix(notify): Init ParentContactType for SSubContact

1. ParentContactType of SSubContact with webconsole type is empty.
2. ParentContactType of others SSubContact is mobile.

* fix(notify): Unverify SSubContact when ParentContactType match

* fix(notify): When no data is initialized, exit directly
2020-09-02 16:10:06 +08:00
Rain Zheng 74af85b8eb Fix for Notify (#7692)
* feat(notify): Support update for notify config

* fix(notify): Be compatible with the email configuration

Email config key text changed:
mail.username => username
mail.password => password
mail.smtp.hostname => hostname
mail.smtp.hostport => hostport

* fix(notify): Give users permission to operate receiver

* fix(notify): Allow negative update for receiver

Now, input.Email and input.Mobile can be empty which means
that do not update the corresponding field.

* feat(notify): Support for triggering validation on feishu, dingtalk and worwx

Triggering validation on these contact types means repulling a Contact about them.

* feat(notify): Adds validity period for verify

Verification beyond the expiration date will fail.

* fix(notify): SQuery of scopedomain in FilterByOwner
2020-09-01 10:45:36 +08:00
Rain Zheng 853153c739 Refactor for Notify (#7611)
* refactor(notify): ALL

* feat(climc): Notify v2

* feat: support notify for codegen.py

* delete deprecated code and Maintain SDK compatibility

* Adjust the template for mail validation to support captcha

* fix: The issue of notify refactoring

* add copyright for notifyv2 cli

* Adjust according to the advice of make check

* Remove utils package in notify

* fix import format

* remove redundant Template module

* fix validateCreate and validateUpdate of notifytemplate

* fix update issues of receivers

* fix: Add SetStageComplete in tasks
2020-08-25 17:19:02 +08:00