mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 07:21:37 +01:00
Correctly increment the _next_id initially
This commit is contained in:
parent
86fc9b617c
commit
3c741682e5
1 changed files with 4 additions and 2 deletions
|
@ -55,9 +55,11 @@ class IdGenerator(object):
|
|||
)
|
||||
|
||||
val, = txn.fetchone()
|
||||
self._next_id = val or 2
|
||||
cur = val or 0
|
||||
cur += 1
|
||||
self._next_id = cur + 1
|
||||
|
||||
return 1
|
||||
return cur
|
||||
|
||||
|
||||
class StreamIdGenerator(object):
|
||||
|
|
Loading…
Reference in a new issue