mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Apply suggestions from code review
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
This commit is contained in:
parent
4a323f15a1
commit
24b3e1a217
|
|
@ -61,11 +61,11 @@ func NewNotifier(pos types.SyncPosition) *Notifier {
|
|||
// current sync position incorrectly.
|
||||
// Chooses which user sync streams to update by a provided *gomatrixserverlib.Event
|
||||
// (based on the users in the event's room),
|
||||
// a roomID directly, or a list of user IDs, whichever specified first in the parameters.
|
||||
// a roomID directly, or a list of user IDs, prioritised by parameter ordering.
|
||||
// posUpdate contains the latest position(s) for one or more types of events.
|
||||
// If a position in posUpdate is 0, it means no updates available of that type.
|
||||
// Typically a consumer supplies a posUpdate with the sync position for the
|
||||
// event type it handles set to the latest, leaving other fields as 0.
|
||||
// If a position in posUpdate is 0, it means no updates are available of that type.
|
||||
// Typically a consumer supplies a posUpdate with the latest sync position for the
|
||||
// event type it handles, leaving other fields as 0.
|
||||
func (n *Notifier) OnNewEvent(
|
||||
ev *gomatrixserverlib.Event, roomID string, userIDs []string,
|
||||
posUpdate types.SyncPosition,
|
||||
|
|
|
|||
2
typingserver/cache/cache.go
vendored
2
typingserver/cache/cache.go
vendored
|
|
@ -22,7 +22,7 @@ const defaultTypingTimeout = 10 * time.Second
|
|||
// userSet is a map of user IDs to a timer, timer fires at expiry.
|
||||
type userSet map[string]*time.Timer
|
||||
|
||||
// TimeoutCallbackFn is a function called right after removal of a user
|
||||
// TimeoutCallbackFn is a function called right after the removal of a user
|
||||
// from the typing user list due to timeout.
|
||||
// latestSyncPosition is the typing sync position after the removal.
|
||||
type TimeoutCallbackFn func(userID, roomID string, latestSyncPosition int64)
|
||||
|
|
|
|||
Loading…
Reference in a new issue