@ -307,7 +307,7 @@ func (g *NotificationSender) setSortVersion(ctx context.Context, version *uint64
}
}
}
}
func ( g * NotificationSender ) GroupCreatedNotification ( ctx context . Context , tips * sdkws . GroupCreatedTips ) {
func ( g * NotificationSender ) GroupCreatedNotification ( ctx context . Context , tips * sdkws . GroupCreatedTips , SendMessage * bool ) {
var err error
var err error
defer func ( ) {
defer func ( ) {
if err != nil {
if err != nil {
@ -318,7 +318,7 @@ func (g *NotificationSender) GroupCreatedNotification(ctx context.Context, tips
return
return
}
}
g . setVersion ( ctx , & tips . GroupMemberVersion , & tips . GroupMemberVersionID , database . GroupMemberVersionName , tips . Group . GroupID )
g . setVersion ( ctx , & tips . GroupMemberVersion , & tips . GroupMemberVersionID , database . GroupMemberVersionName , tips . Group . GroupID )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , tips . Group . GroupID , constant . GroupCreatedNotification , tips )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , tips . Group . GroupID , constant . GroupCreatedNotification , tips , notification . WithSendMessage ( SendMessage ) )
}
}
func ( g * NotificationSender ) GroupInfoSetNotification ( ctx context . Context , tips * sdkws . GroupInfoSetTips ) {
func ( g * NotificationSender ) GroupInfoSetNotification ( ctx context . Context , tips * sdkws . GroupInfoSetTips ) {
@ -505,7 +505,7 @@ func (g *NotificationSender) GroupOwnerTransferredNotification(ctx context.Conte
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , group . GroupID , constant . GroupOwnerTransferredNotification , tips )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , group . GroupID , constant . GroupOwnerTransferredNotification , tips )
}
}
func ( g * NotificationSender ) MemberKickedNotification ( ctx context . Context , tips * sdkws . MemberKickedTips ) {
func ( g * NotificationSender ) MemberKickedNotification ( ctx context . Context , tips * sdkws . MemberKickedTips , SendMessage * bool ) {
var err error
var err error
defer func ( ) {
defer func ( ) {
if err != nil {
if err != nil {
@ -516,10 +516,10 @@ func (g *NotificationSender) MemberKickedNotification(ctx context.Context, tips
return
return
}
}
g . setVersion ( ctx , & tips . GroupMemberVersion , & tips . GroupMemberVersionID , database . GroupMemberVersionName , tips . Group . GroupID )
g . setVersion ( ctx , & tips . GroupMemberVersion , & tips . GroupMemberVersionID , database . GroupMemberVersionName , tips . Group . GroupID )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , tips . Group . GroupID , constant . MemberKickedNotification , tips )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , tips . Group . GroupID , constant . MemberKickedNotification , tips , notification . WithSendMessage ( SendMessage ) )
}
}
func ( g * NotificationSender ) GroupApplicationAgreeMemberEnterNotification ( ctx context . Context , groupID string , invitedOpUserID string , entrantUserID ... string ) error {
func ( g * NotificationSender ) GroupApplicationAgreeMemberEnterNotification ( ctx context . Context , groupID string , SendMessage * bool , invitedOpUserID string , entrantUserID ... string ) error {
var err error
var err error
defer func ( ) {
defer func ( ) {
if err != nil {
if err != nil {
@ -567,7 +567,7 @@ func (g *NotificationSender) GroupApplicationAgreeMemberEnterNotification(ctx co
}
}
}
}
g . setVersion ( ctx , & tips . GroupMemberVersion , & tips . GroupMemberVersionID , database . GroupMemberVersionName , tips . Group . GroupID )
g . setVersion ( ctx , & tips . GroupMemberVersion , & tips . GroupMemberVersionID , database . GroupMemberVersionName , tips . Group . GroupID )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , group . GroupID , constant . MemberInvitedNotification , tips )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , group . GroupID , constant . MemberInvitedNotification , tips , notification . WithSendMessage ( SendMessage ) )
return nil
return nil
}
}
@ -612,7 +612,7 @@ func (g *NotificationSender) MemberEnterNotification(ctx context.Context, groupI
return nil
return nil
}
}
func ( g * NotificationSender ) GroupDismissedNotification ( ctx context . Context , tips * sdkws . GroupDismissedTips ) {
func ( g * NotificationSender ) GroupDismissedNotification ( ctx context . Context , tips * sdkws . GroupDismissedTips , SendMessage * bool ) {
var err error
var err error
defer func ( ) {
defer func ( ) {
if err != nil {
if err != nil {
@ -622,7 +622,7 @@ func (g *NotificationSender) GroupDismissedNotification(ctx context.Context, tip
if err = g . fillOpUser ( ctx , & tips . OpUser , tips . Group . GroupID ) ; err != nil {
if err = g . fillOpUser ( ctx , & tips . OpUser , tips . Group . GroupID ) ; err != nil {
return
return
}
}
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , tips . Group . GroupID , constant . GroupDismissedNotification , tips )
g . Notification ( ctx , mcontext . GetOpUserID ( ctx ) , tips . Group . GroupID , constant . GroupDismissedNotification , tips , notification . WithSendMessage ( SendMessage ) )
}
}
func ( g * NotificationSender ) GroupMemberMutedNotification ( ctx context . Context , groupID , groupMemberUserID string , mutedSeconds uint32 ) {
func ( g * NotificationSender ) GroupMemberMutedNotification ( ctx context . Context , groupID , groupMemberUserID string , mutedSeconds uint32 ) {