FavoriteChannelThreadActivity.js

From disqus.com, 2 Months ago, written in JavaScript, viewed 3 times. This paste is a reply to CreateThreadActivity.js from disqus.com - view diff
URL https://pastebin.freepbx.org/view/c1ee65e0 Embed
Download Paste or View Raw
  1. define('home/models/activities/FavoriteChannelThreadActivity',[
  2.     'home/models/activities/ThreadActivity',
  3.     'home/activityExpander',
  4. ], function (
  5.     ThreadActivity,
  6.     activityExpander
  7. ) {
  8.     'use strict';
  9.  
  10.     /**
  11.      * User favorites a channel thread
  12.      *
  13.      * Relations {
  14.      *     actor: {
  15.      *         type: 'user',
  16.      *         description: 'The user that favorited the thread'
  17.      *     },
  18.      *     target: {
  19.      *         type: 'thread',
  20.      *         description: 'The thread that was favorited'
  21.      *     }
  22.      * }
  23.      */
  24.     var FavoriteChannelThreadActivity = ThreadActivity.extend({
  25.         defaults: {
  26.             verb: 'recommend',
  27.         },
  28.  
  29.         initialize: function (attributes) {
  30.             ThreadActivity.prototype.initialize.call(this, attributes);
  31.             this.actor = attributes.actor;
  32.         },
  33.  
  34.         parseRelatedModels: function (attributes, objects) {
  35.             ThreadActivity.prototype.parseRelatedModels.call(this, attributes, objects);
  36.             attributes.actor = activityExpander.buildUser(objects, attributes.actor);
  37.             return attributes;
  38.         },
  39.     });
  40.  
  41.     return FavoriteChannelThreadActivity;
  42. });
  43.  
  44.  
  45. // https://c.disquscdn.com/next/home/js/models/activities/FavoriteChannelThreadActivity.js

Replies to FavoriteChannelThreadActivity.js rss

Title Name Language When
FavoriteThreadActivity.js disqus.com javascript 2 Months ago.

Reply to "FavoriteChannelThreadActivity.js"

Here you can reply to the paste above