Fix build on 386
This commit is contained in:
parent
578e173428
commit
78974fe53d
|
@ -120,7 +120,7 @@ func GetStateForEvents(ctx context.Context, db storage.Database, events []gomatr
|
|||
}
|
||||
// get the membership event
|
||||
var membership string
|
||||
membership, memberPos, err := db.SelectMembershipForUser(ctx, ev.RoomID, userID, int(pos.Depth))
|
||||
membership, memberPos, err := db.SelectMembershipForUser(ctx, ev.RoomID, userID, int64(pos.Depth))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ type Database interface {
|
|||
// SelectMembershipForUser returns the membership of the user before and including the given position. If no membership can be found
|
||||
// returns "leave", the topological position and no error. If an error occurs, other than sql.ErrNoRows, returns that and an empty
|
||||
// string as the membership.
|
||||
SelectMembershipForUser(ctx context.Context, roomID, userID string, pos int) (membership string, topologicalPos int, err error)
|
||||
SelectMembershipForUser(ctx context.Context, roomID, userID string, pos int64) (membership string, topologicalPos int, err error)
|
||||
}
|
||||
|
||||
type Presence interface {
|
||||
|
|
|
@ -142,7 +142,7 @@ func (s *membershipsStatements) SelectHeroes(
|
|||
// returns "leave", the topological position and no error. If an error occurs, other than sql.ErrNoRows, returns that and an empty
|
||||
// string as the membership.
|
||||
func (s *membershipsStatements) SelectMembershipForUser(
|
||||
ctx context.Context, txn *sql.Tx, roomID, userID string, pos int,
|
||||
ctx context.Context, txn *sql.Tx, roomID, userID string, pos int64,
|
||||
) (membership string, topologyPos int, err error) {
|
||||
stmt := sqlutil.TxStmt(txn, s.selectMembershipForUserStmt)
|
||||
err = stmt.QueryRowContext(ctx, roomID, userID, pos).Scan(&membership, &topologyPos)
|
||||
|
|
|
@ -1072,6 +1072,6 @@ func (d *Database) SelectTopologicalEvent(ctx context.Context, topologicalPositi
|
|||
return d.OutputEvents.SelectTopologicalEvent(ctx, nil, topologicalPosition, eventType, roomID)
|
||||
}
|
||||
|
||||
func (d *Database) SelectMembershipForUser(ctx context.Context, roomID, userID string, pos int) (membership string, topologicalPos int, err error) {
|
||||
func (d *Database) SelectMembershipForUser(ctx context.Context, roomID, userID string, pos int64) (membership string, topologicalPos int, err error) {
|
||||
return d.Memberships.SelectMembershipForUser(ctx, nil, roomID, userID, pos)
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ func (s *membershipsStatements) SelectHeroes(
|
|||
// returns "leave", the topological position and no error. If an error occurs, other than sql.ErrNoRows, returns that and an empty
|
||||
// string as the membership.
|
||||
func (s *membershipsStatements) SelectMembershipForUser(
|
||||
ctx context.Context, txn *sql.Tx, roomID, userID string, pos int,
|
||||
ctx context.Context, txn *sql.Tx, roomID, userID string, pos int64,
|
||||
) (membership string, topologyPos int, err error) {
|
||||
stmt := sqlutil.TxStmt(txn, s.selectMembershipForUserStmt)
|
||||
err = stmt.QueryRowContext(ctx, roomID, userID, pos).Scan(&membership, &topologyPos)
|
||||
|
|
|
@ -174,7 +174,7 @@ type Memberships interface {
|
|||
UpsertMembership(ctx context.Context, txn *sql.Tx, event *gomatrixserverlib.HeaderedEvent, streamPos, topologicalPos types.StreamPosition) error
|
||||
SelectMembershipCount(ctx context.Context, txn *sql.Tx, roomID, membership string, pos types.StreamPosition) (count int, err error)
|
||||
SelectHeroes(ctx context.Context, txn *sql.Tx, roomID, userID string, memberships []string) (heroes []string, err error)
|
||||
SelectMembershipForUser(ctx context.Context, txn *sql.Tx, roomID, userID string, pos int) (membership string, topologicalPos int, err error)
|
||||
SelectMembershipForUser(ctx context.Context, txn *sql.Tx, roomID, userID string, pos int64) (membership string, topologicalPos int, err error)
|
||||
}
|
||||
|
||||
type NotificationData interface {
|
||||
|
|
Loading…
Reference in a new issue