ChannelPostActivity.js

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

Replies to ChannelPostActivity.js rss

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

Reply to "ChannelPostActivity.js"

Here you can reply to the paste above