mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 06:12:25 -05:00 
			
		
		
		
	fix up more tests, fix missing required changes, etc
This commit is contained in:
		
					parent
					
						
							
								61f8da707c
							
						
					
				
			
			
				commit
				
					
						64564496f1
					
				
			
		
					 10 changed files with 130 additions and 84 deletions
				
			
		|  | @ -346,7 +346,7 @@ func (p *fediAPI) CreateStatus(ctx context.Context, fMsg *messages.FromFediAPI) | |||
| 		// Interaction counts changed on the replied status; uncache the | ||||
| 		// prepared version from all timelines. The status dereferencer | ||||
| 		// functions will ensure necessary ancestors exist before this point. | ||||
| 		p.surface.invalidateStatusFromTimelines(ctx, status.InReplyToID) | ||||
| 		p.surface.invalidateStatusFromTimelines(status.InReplyToID) | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
|  | @ -393,7 +393,7 @@ func (p *fediAPI) CreatePollVote(ctx context.Context, fMsg *messages.FromFediAPI | |||
| 	} | ||||
| 
 | ||||
| 	// Interaction counts changed, uncache from timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, status.ID) | ||||
| 	p.surface.invalidateStatusFromTimelines(status.ID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -428,7 +428,7 @@ func (p *fediAPI) UpdatePollVote(ctx context.Context, fMsg *messages.FromFediAPI | |||
| 	} | ||||
| 
 | ||||
| 	// Interaction counts changed, uncache from timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, status.ID) | ||||
| 	p.surface.invalidateStatusFromTimelines(status.ID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -573,7 +573,7 @@ func (p *fediAPI) CreateLike(ctx context.Context, fMsg *messages.FromFediAPI) er | |||
| 
 | ||||
| 	// Interaction counts changed on the faved status; | ||||
| 	// uncache the prepared version from all timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, fave.StatusID) | ||||
| 	p.surface.invalidateStatusFromTimelines(fave.StatusID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -690,7 +690,7 @@ func (p *fediAPI) CreateAnnounce(ctx context.Context, fMsg *messages.FromFediAPI | |||
| 
 | ||||
| 	// Interaction counts changed on the original status; | ||||
| 	// uncache the prepared version from all timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, boost.BoostOfID) | ||||
| 	p.surface.invalidateStatusFromTimelines(boost.BoostOfID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -835,7 +835,7 @@ func (p *fediAPI) AcceptReply(ctx context.Context, fMsg *messages.FromFediAPI) e | |||
| 
 | ||||
| 	// Interaction counts changed on the replied-to status; | ||||
| 	// uncache the prepared version from all timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, status.InReplyToID) | ||||
| 	p.surface.invalidateStatusFromTimelines(status.InReplyToID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -884,11 +884,11 @@ func (p *fediAPI) AcceptRemoteStatus(ctx context.Context, fMsg *messages.FromFed | |||
| 	// Interaction counts changed on the interacted status; | ||||
| 	// uncache the prepared version from all timelines. | ||||
| 	if status.InReplyToID != "" { | ||||
| 		p.surface.invalidateStatusFromTimelines(ctx, status.InReplyToID) | ||||
| 		p.surface.invalidateStatusFromTimelines(status.InReplyToID) | ||||
| 	} | ||||
| 
 | ||||
| 	if status.BoostOfID != "" { | ||||
| 		p.surface.invalidateStatusFromTimelines(ctx, status.BoostOfID) | ||||
| 		p.surface.invalidateStatusFromTimelines(status.BoostOfID) | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
|  | @ -917,7 +917,7 @@ func (p *fediAPI) AcceptAnnounce(ctx context.Context, fMsg *messages.FromFediAPI | |||
| 
 | ||||
| 	// Interaction counts changed on the boosted status; | ||||
| 	// uncache the prepared version from all timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, boost.BoostOfID) | ||||
| 	p.surface.invalidateStatusFromTimelines(boost.BoostOfID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -968,7 +968,7 @@ func (p *fediAPI) UpdateStatus(ctx context.Context, fMsg *messages.FromFediAPI) | |||
| 	} | ||||
| 
 | ||||
| 	// Status representation was refetched, uncache from timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, status.ID) | ||||
| 	p.surface.invalidateStatusFromTimelines(status.ID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  | @ -1027,7 +1027,7 @@ func (p *fediAPI) DeleteStatus(ctx context.Context, fMsg *messages.FromFediAPI) | |||
| 	if status.InReplyToID != "" { | ||||
| 		// Interaction counts changed on the replied status; | ||||
| 		// uncache the prepared version from all timelines. | ||||
| 		p.surface.invalidateStatusFromTimelines(ctx, status.InReplyToID) | ||||
| 		p.surface.invalidateStatusFromTimelines(status.InReplyToID) | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
|  | @ -1192,13 +1192,11 @@ func (p *fediAPI) UndoAnnounce( | |||
| 	} | ||||
| 
 | ||||
| 	// Remove the boost wrapper from all timelines. | ||||
| 	if err := p.surface.deleteStatusFromTimelines(ctx, boost.ID); err != nil { | ||||
| 		log.Errorf(ctx, "error removing timelined boost: %v", err) | ||||
| 	} | ||||
| 	p.surface.deleteStatusFromTimelines(ctx, boost.ID) | ||||
| 
 | ||||
| 	// Interaction counts changed on the boosted status; | ||||
| 	// uncache the prepared version from all timelines. | ||||
| 	p.surface.invalidateStatusFromTimelines(ctx, boost.BoostOfID) | ||||
| 	p.surface.invalidateStatusFromTimelines(boost.BoostOfID) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue