Remove old code

We consider Dislike as a classic activity now
This commit is contained in:
Chocobozzz 2021-02-12 14:49:59 +01:00
parent 18ffaf2430
commit c15aff666d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 7 additions and 9 deletions

View File

@ -49,7 +49,7 @@ Be part of a network of multiple small federated, interoperable video hosting pr
<img alt="test suite status" src="https://github.com/Chocobozzz/PeerTube/workflows/Test%20Suite/badge.svg" /> <img alt="test suite status" src="https://github.com/Chocobozzz/PeerTube/workflows/Test%20Suite/badge.svg" />
</a> </a>
<a href="http://standardjs.com/"> <a href="https://standardjs.com/">
<img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="JavaScript Style Guide" /> <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="JavaScript Style Guide" />
</a> </a>
</p> </p>
@ -58,7 +58,7 @@ Be part of a network of multiple small federated, interoperable video hosting pr
<p align="center"> <p align="center">
<a href="https://framatube.org/videos/watch/217eefeb-883d-45be-b7fc-a788ad8507d3"> <a href="https://framatube.org/videos/watch/217eefeb-883d-45be-b7fc-a788ad8507d3">
<img src="http://lutim.cpy.re/9CLXh0Ys.png" alt="screenshot" /> <img src="https://lutim.cpy.re/9CLXh0Ys.png" alt="screenshot" />
</a> </a>
</p> </p>
@ -190,4 +190,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details. GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.

View File

@ -6,12 +6,12 @@ import { sequelizeTypescript } from '../../../initializers/database'
import { AccountVideoRateModel } from '../../../models/account/account-video-rate' import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
import { ActorModel } from '../../../models/activitypub/actor' import { ActorModel } from '../../../models/activitypub/actor'
import { ActorFollowModel } from '../../../models/activitypub/actor-follow' import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
import { forwardVideoRelatedActivity } from '../send/utils'
import { getOrCreateVideoAndAccountAndChannel } from '../videos'
import { VideoShareModel } from '../../../models/video/video-share'
import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
import { VideoShareModel } from '../../../models/video/video-share'
import { APProcessorOptions } from '../../../types/activitypub-processor.model' import { APProcessorOptions } from '../../../types/activitypub-processor.model'
import { MActorSignature } from '../../../types/models' import { MActorSignature } from '../../../types/models'
import { forwardVideoRelatedActivity } from '../send/utils'
import { getOrCreateVideoAndAccountAndChannel } from '../videos'
async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) {
const { activity, byActor } = options const { activity, byActor } = options
@ -22,9 +22,7 @@ async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) {
} }
if (activityToUndo.type === 'Create') { if (activityToUndo.type === 'Create') {
if (activityToUndo.object.type === 'Dislike') { if (activityToUndo.object.type === 'CacheFile') {
return retryTransactionWrapper(processUndoDislike, byActor, activity)
} else if (activityToUndo.object.type === 'CacheFile') {
return retryTransactionWrapper(processUndoCacheFile, byActor, activity) return retryTransactionWrapper(processUndoCacheFile, byActor, activity)
} }
} }