Skip to content

Commit

Permalink
fix: change offset of pull message when push message come here. (#394)
Browse files Browse the repository at this point in the history
* fix: do not pull notifications when app reinstalled.

Signed-off-by: Gordon <[email protected]>

* fix: do not pull notifications when app reinstalled.

Signed-off-by: Gordon <[email protected]>

* fix: do not pull notifications when app reinstalled.

Signed-off-by: Gordon <[email protected]>

* fix: change offset of pull message when push message come here.

Signed-off-by: Gordon <[email protected]>

---------

Signed-off-by: Gordon <[email protected]>
  • Loading branch information
FGadvancer authored Oct 31, 2023
1 parent 06f0813 commit 95fbaaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/interaction/msg_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ func (m *MsgSyncer) pushTriggerAndSync(ctx context.Context, pullMsgs map[string]
_ = triggerFunc(ctx, map[string]*sdkws.PullMsgs{conversationID: {Msgs: storageMsgs}})
m.syncedMaxSeqs[conversationID] = lastSeq
} else if lastSeq != 0 && lastSeq > m.syncedMaxSeqs[conversationID] {
needSyncSeqMap[conversationID] = [2]int64{m.syncedMaxSeqs[conversationID], lastSeq}
//must pull message when message type is notification
needSyncSeqMap[conversationID] = [2]int64{m.syncedMaxSeqs[conversationID] + 1, lastSeq}
}
}
m.syncAndTriggerMsgs(ctx, needSyncSeqMap, defaultPullNums)
Expand Down

0 comments on commit 95fbaaa

Please sign in to comment.