refactor: change sendNotification to sendMessage to avoid ambiguity regarding message sending behavior. (#3173)

* feat: add a field to specify whether to send a notification message when creating a group.

* feat: add a field to specify whether to send a notification message when creating a group.

* refactor: change sendNotification to sendMessage to avoid ambiguity regarding message sending behavior.

---------

Co-authored-by: Monet Lee <monet_lee@163.com>
This commit is contained in:
OpenIM-Gordon
2025-02-28 16:59:04 +08:00
committed by GitHub
parent 4d2fce0e52
commit 1df02692bf
6 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -57,11 +57,11 @@ func GetProjectRoot() (string, error) {
return projectRoot, nil
}
func GetOptionsByNotification(cfg NotificationConfig, sendNotification *bool) msgprocessor.Options {
func GetOptionsByNotification(cfg NotificationConfig, sendMessage *bool) msgprocessor.Options {
opts := msgprocessor.NewOptions()
if sendNotification != nil {
cfg.IsSendMsg = *sendNotification
if sendMessage != nil {
cfg.IsSendMsg = *sendMessage
}
if cfg.IsSendMsg {
opts = msgprocessor.WithOptions(opts, msgprocessor.WithUnreadCount(true))