decord/source/__polyfill/00xxx/module_767.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

38 lines
1 KiB
JavaScript

// Module ID: 767
// Function ID: 768
// Dependencies: []
// Exports: addAutoIpAddressToSession, addAutoIpAddressToUser
// Module 767
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
export const addAutoIpAddressToSession = function addAutoIpAddressToSession(attrs) {
if ("aggregates" in attrs) {
attrs = attrs.attrs;
let ip_address;
if (attrs != null) {
ip_address = attrs.ip_address;
}
if (undefined === ip_address) {
const obj = {};
const merged = Object.assign(attrs.attrs);
obj.ip_address = "{{auto}}";
attrs.attrs = obj;
}
} else if (undefined === attrs.ipAddress) {
attrs.ipAddress = "{{auto}}";
}
};
export const addAutoIpAddressToUser = function addAutoIpAddressToUser(user) {
user = user.user;
let ip_address;
if (user != null) {
ip_address = user.ip_address;
}
if (undefined === ip_address) {
const obj = {};
const merged = Object.assign(user.user);
obj.ip_address = "{{auto}}";
user.user = obj;
}
};