Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: constant #560

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/group/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ func (g *Group) doNotification(ctx context.Context, msg *sdkws.MsgData) error {
return err
}
switch detail.ReceiverAs {
case 0:
case constant.ApplicantReceiver:
return g.SyncAllSelfGroupApplication(ctx)
case 1:
case constant.AdminReceiver:
return g.SyncAdminGroupApplications(ctx, detail.Group.GroupID)
default:
return fmt.Errorf("GroupApplicationAcceptedNotification ReceiverAs unknown %d", detail.ReceiverAs)
Expand Down
6 changes: 3 additions & 3 deletions pkg/constant/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ const UseHashGroupMemberNum = 1000

const (
Uninitialized = -1001
NoNetwork = 1 //有网络->无网络
NetworkAvailable = 2 //无网络->有网络
NetworkVariation = 3 //有网络,但状态有变化
NoNetwork = 1 // Online -> Offline
NetworkAvailable = 2 // Offline -> Online
NetworkVariation = 3 // Online, but status changed
)
7 changes: 7 additions & 0 deletions pkg/constant/group.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package constant

// GroupApplicationReceiver
const (
ApplicantReceiver = iota
AdminReceiver
)
Loading