chore: refresh gramsrv public release
This commit is contained in:
parent
75cebe8dbf
commit
70b6820474
1274 changed files with 378751 additions and 59919 deletions
22
internal/store/memory/message_allocators.go
Normal file
22
internal/store/memory/message_allocators.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package memory
|
||||
|
||||
func (s *MessageStore) nextBoxIDLocked(userID int64) int {
|
||||
next := s.nextBox[userID] + 1
|
||||
s.nextBox[userID] = next
|
||||
return next
|
||||
}
|
||||
|
||||
func (s *MessageStore) nextPtsLocked(userID int64) int {
|
||||
next := s.nextPts[userID] + 1
|
||||
s.nextPts[userID] = next
|
||||
return next
|
||||
}
|
||||
|
||||
func (s *MessageStore) nextPtsNLocked(userID int64, count int) int {
|
||||
if count <= 0 {
|
||||
count = 1
|
||||
}
|
||||
next := s.nextPts[userID] + count
|
||||
s.nextPts[userID] = next
|
||||
return next
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue