Name

global.LiveFeedFilter

Description

Query filters for working with live_feed records. Client callable so getSessionGroups() method is accessible in filters.

Script

var LiveFeedFilter = Class.create();

LiveFeedFilter.prototype = {
initialize: function() {
},

// Return the user profile for the current session
// Duplicated from LiveFeedUtil to avoid extra dependency
getSessionProfile: function() {
  return new GlideappLiveProfile().getID();
},

// List the groups that the current session may access
getSessionGroups: function() {
  var gr = new GlideRecord('live_group_member');
  gr.addQuery('member', this.getSessionProfile());
  gr.query();
  result = [];
  while (gr.next()) {
    result.push(gr.group.toString());
  }
  return result;
},
  
type: "LiveFeedFilter"
}

Sys ID

e2cd1e1c0a000579457bd2f25685de7b

Offical Documentation

Official Docs: