This is an automated email from the ASF dual-hosted git repository. linkinstar pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
commit 7d6c46c35985c3250fc0b2cfc06e11bb72a58139 Author: LinkinStars <[email protected]> AuthorDate: Fri Jan 26 15:35:31 2024 +0800 feat(wecom): update notification interface --- user-center-wecom/notification.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/user-center-wecom/notification.go b/user-center-wecom/notification.go index 6b4e951..d105100 100644 --- a/user-center-wecom/notification.go +++ b/user-center-wecom/notification.go @@ -1,12 +1,13 @@ package wecom import ( + "strings" + wecomI18n "github.com/apache/incubator-answer-plugins/user-center-wecom/i18n" "github.com/apache/incubator-answer/plugin" "github.com/segmentfault/pacman/i18n" "github.com/segmentfault/pacman/log" "github.com/silenceper/wechat/v2/work/message" - "strings" ) // GetNewQuestionSubscribers returns the subscribers of the new question notification @@ -20,7 +21,7 @@ func (uc *UserCenter) GetNewQuestionSubscribers() (userIDs []string) { } // Notify sends a notification to the user -func (uc *UserCenter) Notify(msg *plugin.NotificationMessage) { +func (uc *UserCenter) Notify(msg plugin.NotificationMessage) { log.Debugf("try to send notification %+v", msg) if !uc.Config.Notification { @@ -88,7 +89,7 @@ func (uc *UserCenter) Notify(msg *plugin.NotificationMessage) { } } -func renderNotification(msg *plugin.NotificationMessage) string { +func renderNotification(msg plugin.NotificationMessage) string { lang := i18n.Language(msg.ReceiverLang) switch msg.Type { case plugin.NotificationUpdateQuestion:
