mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-29 04:22:24 -05:00 
			
		
		
		
	[feature] Implement backfilling statuses thru scheduled_at (#3685)
* Implement backfilling statuses thru scheduled_at * Forbid mentioning others in backfills * Update error messages & codes * Add new tests for backfilled statuses * Test that backfilling doesn't timeline or notify * Fix check for absence of notification * Test that backfills do not cause federation * Fix type of apimodel.StatusCreateRequest.ScheduledAt in tests * Add config file switch and min date check
This commit is contained in:
		
					parent
					
						
							
								37dbf319b1
							
						
					
				
			
			
				commit
				
					
						fccb0bc102
					
				
			
		
					 18 changed files with 515 additions and 42 deletions
				
			
		|  | @ -1082,6 +1082,31 @@ func GetInstanceStatsMode() string { return global.GetInstanceStatsMode() } | |||
| // SetInstanceStatsMode safely sets the value for global configuration 'InstanceStatsMode' field | ||||
| func SetInstanceStatsMode(v string) { global.SetInstanceStatsMode(v) } | ||||
| 
 | ||||
| // GetInstanceAllowBackdatingStatuses safely fetches the Configuration value for state's 'InstanceAllowBackdatingStatuses' field | ||||
| func (st *ConfigState) GetInstanceAllowBackdatingStatuses() (v bool) { | ||||
| 	st.mutex.RLock() | ||||
| 	v = st.config.InstanceAllowBackdatingStatuses | ||||
| 	st.mutex.RUnlock() | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // SetInstanceAllowBackdatingStatuses safely sets the Configuration value for state's 'InstanceAllowBackdatingStatuses' field | ||||
| func (st *ConfigState) SetInstanceAllowBackdatingStatuses(v bool) { | ||||
| 	st.mutex.Lock() | ||||
| 	defer st.mutex.Unlock() | ||||
| 	st.config.InstanceAllowBackdatingStatuses = v | ||||
| 	st.reloadToViper() | ||||
| } | ||||
| 
 | ||||
| // InstanceAllowBackdatingStatusesFlag returns the flag name for the 'InstanceAllowBackdatingStatuses' field | ||||
| func InstanceAllowBackdatingStatusesFlag() string { return "instance-allow-backdating-statuses" } | ||||
| 
 | ||||
| // GetInstanceAllowBackdatingStatuses safely fetches the value for global configuration 'InstanceAllowBackdatingStatuses' field | ||||
| func GetInstanceAllowBackdatingStatuses() bool { return global.GetInstanceAllowBackdatingStatuses() } | ||||
| 
 | ||||
| // SetInstanceAllowBackdatingStatuses safely sets the value for global configuration 'InstanceAllowBackdatingStatuses' field | ||||
| func SetInstanceAllowBackdatingStatuses(v bool) { global.SetInstanceAllowBackdatingStatuses(v) } | ||||
| 
 | ||||
| // GetAccountsRegistrationOpen safely fetches the Configuration value for state's 'AccountsRegistrationOpen' field | ||||
| func (st *ConfigState) GetAccountsRegistrationOpen() (v bool) { | ||||
| 	st.mutex.RLock() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue