/AddModActivity.js

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

Replies to /AddModActivity.js rss

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

Reply to "/AddModActivity.js"

Here you can reply to the paste above