mirror of
				https://github.com/superseriousbusiness/gotosocial
				synced 2025-06-05 21:59:39 +02:00 
			
		
		
		
	[feature] Rework timeline code to make it useful for more than just statuses (#373)
* add preparable and timelineable interfaces * initialize timeline manager within the processor * generic renaming * move status-specific timeline logic into the processor * refactor timeline to make it useful for more than statuses
This commit is contained in:
		@@ -96,6 +96,36 @@ type Status struct {
 | 
			
		||||
	Text string `json:"text"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The below functions are added onto the API model status so that it satisfies
 | 
			
		||||
** the Preparable interface in internal/timeline.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
func (s *Status) GetID() string {
 | 
			
		||||
	return s.ID
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *Status) GetAccountID() string {
 | 
			
		||||
	if s.Account != nil {
 | 
			
		||||
		return s.Account.ID
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *Status) GetBoostOfID() string {
 | 
			
		||||
	if s.Reblog != nil {
 | 
			
		||||
		return s.Reblog.ID
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *Status) GetBoostOfAccountID() string {
 | 
			
		||||
	if s.Reblog != nil && s.Reblog.Account != nil {
 | 
			
		||||
		return s.Reblog.Account.ID
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// StatusReblogged represents a reblogged status.
 | 
			
		||||
//
 | 
			
		||||
// swagger:model statusReblogged
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user