/ChannelInviteActivity.js

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

Replies to /ChannelInviteActivity.js rss

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

Reply to "/ChannelInviteActivity.js"

Here you can reply to the paste above