mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Fix issue uint64 values with high bit are not supported
in presence (#2562)
* Fix issue #2528 * Use gomatrixserverlib.Timestamp * Use ParseUint instead of ParseInt
This commit is contained in:
parent
f3e8a9a4cb
commit
f76f28e6db
3 changed files with 7 additions and 7 deletions
|
@ -61,7 +61,7 @@ type PresencePublisher interface {
|
|||
}
|
||||
|
||||
type PresenceConsumer interface {
|
||||
EmitPresence(ctx context.Context, userID string, presence types.Presence, statusMsg *string, ts int, fromSync bool)
|
||||
EmitPresence(ctx context.Context, userID string, presence types.Presence, statusMsg *string, ts gomatrixserverlib.Timestamp, fromSync bool)
|
||||
}
|
||||
|
||||
// NewRequestPool makes a new RequestPool
|
||||
|
@ -171,7 +171,7 @@ func (rp *RequestPool) updatePresence(db storage.Presence, presence string, user
|
|||
// the /sync response else we may not return presence: online immediately.
|
||||
rp.consumer.EmitPresence(
|
||||
context.Background(), userID, presenceID, newPresence.ClientFields.StatusMsg,
|
||||
int(gomatrixserverlib.AsTimestamp(time.Now())), true,
|
||||
gomatrixserverlib.AsTimestamp(time.Now()), true,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ func (d dummyDB) MaxStreamPositionForPresence(ctx context.Context) (types.Stream
|
|||
|
||||
type dummyConsumer struct{}
|
||||
|
||||
func (d dummyConsumer) EmitPresence(ctx context.Context, userID string, presence types.Presence, statusMsg *string, ts int, fromSync bool) {
|
||||
func (d dummyConsumer) EmitPresence(ctx context.Context, userID string, presence types.Presence, statusMsg *string, ts gomatrixserverlib.Timestamp, fromSync bool) {
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue