fix: user offline push (#1015)

* fix: create group type limit

* fix: group notification

* fix: group notification

* fix: group notification

* chore: group member hash

* chore: group member hash

* chore: group member hash

* chore: group member hash

* test: log

* test: log

* test: log

* test: log

* test: log

* sync: hash code

* sync: hash code

* sync: hash code

* test: log

* test: log

* test: log

* test: log

* test: log

* fix: time stamp

* fix: minio sign endpoint opts

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: minio bucket url

* fix: op user info

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: importFriends Conversation

* fix: importFriends Notification

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: importFriends Notification

* NotificationUserInfoUpdate

* NotificationUserInfoUpdate

* NotificationUserInfoUpdate

* NotificationUserInfoUpdate

* NotificationUserInfoUpdate

* NotificationUserInfoUpdate

* NotificationUserInfoUpdate

* TransferGroupOwner del group hash

* add GetSpecifiedFriendsInfo

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* remove pprop

* chore: optimize modification and send notifications

* chore: optimize modification and send notifications

* fix: repeated modification session notification

* fix: repeated modification session notification

* fix: jpush return a nil pointer panic

* fix: user offline push

* fix: user offline push

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: withchao <withchao@users.noreply.github.com>
pull/1016/head
withchao 1 year ago committed by GitHub
parent 1e592f3151
commit eae79d567c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -107,20 +107,17 @@ func (p *Pusher) Push2User(ctx context.Context, userIDs []string, msg *sdkws.Msg
isOfflinePush := utils.GetSwitchFromOptions(msg.Options, constant.IsOfflinePush)
log.ZDebug(ctx, "push_result", "ws push result", wsResults, "sendData", msg, "isOfflinePush", isOfflinePush, "push_to_userID", userIDs)
p.successCount++
for _, userID := range userIDs {
if isOfflinePush && userID != msg.SendID {
// save invitation info for offline push
for _, v := range wsResults {
if v.OnlinePush {
return nil
if isOfflinePush {
for _, v := range wsResults {
if msg.SendID != v.UserID && (!v.OnlinePush) {
if err := callbackOfflinePush(ctx, userIDs, msg, &[]string{}); err != nil {
return err
}
}
if err := callbackOfflinePush(ctx, userIDs, msg, &[]string{}); err != nil {
return err
}
err = p.offlinePushMsg(ctx, userID, msg, userIDs)
if err != nil {
return err
err = p.offlinePushMsg(ctx, msg.SendID, msg, []string{v.UserID})
if err != nil {
return err
}
break
}
}
}

Loading…
Cancel
Save