Browse Source

Remove old code

We consider Dislike as a classic activity now
Chocobozzz 3 years ago
parent
commit
c15aff666d
2 changed files with 7 additions and 9 deletions
  1. 3 3
      README.md
  2. 4 6
      server/lib/activitypub/process/process-undo.ts

+ 3 - 3
README.md

@@ -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" />
   </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" />
   </a>
 </p>
@@ -58,7 +58,7 @@ Be part of a network of multiple small federated, interoperable video hosting pr
 
 <p align="center">
   <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>
 </p>
 
@@ -190,4 +190,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.
 
 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/>.

+ 4 - 6
server/lib/activitypub/process/process-undo.ts

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