[feature] add support for polls + receiving federated status edits (#2330)

This commit is contained in:
kim 2023-11-08 14:32:17 +00:00 committed by GitHub
commit e9e5dc5a40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
84 changed files with 3992 additions and 570 deletions

View file

@ -199,7 +199,8 @@ func (r *relationshipDB) getAccountFollowIDs(ctx context.Context, accountID stri
// Follow IDs not in cache, perform DB query!
q := newSelectFollows(r.db, accountID)
if _, err := q.Exec(ctx, &followIDs); err != nil {
if _, err := q.Exec(ctx, &followIDs); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, err
}
@ -213,7 +214,8 @@ func (r *relationshipDB) getAccountLocalFollowIDs(ctx context.Context, accountID
// Follow IDs not in cache, perform DB query!
q := newSelectLocalFollows(r.db, accountID)
if _, err := q.Exec(ctx, &followIDs); err != nil {
if _, err := q.Exec(ctx, &followIDs); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, err
}
@ -227,7 +229,8 @@ func (r *relationshipDB) getAccountFollowerIDs(ctx context.Context, accountID st
// Follow IDs not in cache, perform DB query!
q := newSelectFollowers(r.db, accountID)
if _, err := q.Exec(ctx, &followIDs); err != nil {
if _, err := q.Exec(ctx, &followIDs); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, err
}
@ -241,7 +244,8 @@ func (r *relationshipDB) getAccountLocalFollowerIDs(ctx context.Context, account
// Follow IDs not in cache, perform DB query!
q := newSelectLocalFollowers(r.db, accountID)
if _, err := q.Exec(ctx, &followIDs); err != nil {
if _, err := q.Exec(ctx, &followIDs); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, err
}
@ -255,7 +259,8 @@ func (r *relationshipDB) getAccountFollowRequestIDs(ctx context.Context, account
// Follow request IDs not in cache, perform DB query!
q := newSelectFollowRequests(r.db, accountID)
if _, err := q.Exec(ctx, &followReqIDs); err != nil {
if _, err := q.Exec(ctx, &followReqIDs); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, err
}
@ -269,7 +274,8 @@ func (r *relationshipDB) getAccountFollowRequestingIDs(ctx context.Context, acco
// Follow request IDs not in cache, perform DB query!
q := newSelectFollowRequesting(r.db, accountID)
if _, err := q.Exec(ctx, &followReqIDs); err != nil {
if _, err := q.Exec(ctx, &followReqIDs); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, err
}
@ -283,7 +289,8 @@ func (r *relationshipDB) getAccountBlockIDs(ctx context.Context, accountID strin
// Block IDs not in cache, perform DB query!
q := newSelectBlocks(r.db, accountID)
if _, err := q.Exec(ctx, &blockIDs); err != nil {
if _, err := q.Exec(ctx, &blockIDs); // nocollapse
err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, err
}