decord/source/3755_createFavoritesChannelRecord.js
2026-07-20 16:05:17 +00:00

31 lines
977 B
JavaScript

// Module ID: 3755
// Function ID: 28674
// Name: createFavoritesChannelRecord
// Dependencies: []
// Exports: createFavoritesChannelRecord
// Module 3755 (createFavoritesChannelRecord)
const ChannelTypes = require(dependencyMap[0]).ChannelTypes;
const _module = require(dependencyMap[1]);
const result = _module.fileFinishedImporting("modules/favorites/createFavoritesChannelRecord.tsx");
export const createFavoritesChannelRecord = function createFavoritesChannelRecord(arg0, order, toJS) {
const constructor = new toJS.constructor(toJS.toJS());
constructor.position_ = order.order;
let tmp2 = null != order.nickname;
if (tmp2) {
tmp2 = toJS.type !== ChannelTypes.DM;
}
if (tmp2) {
constructor.name = order.nickname;
}
if (null != order.parentId) {
if (order.parentId in arg0) {
constructor.parent_id = order.parentId;
}
return constructor;
}
if (undefined === constructor.parent_id) {
constructor.parent_id = null;
}
};