59 lines
2.1 KiB
TypeScript
59 lines
2.1 KiB
TypeScript
// Module ID: 17247
|
|
// Function ID: 17248
|
|
// Name: RelationshipUtils
|
|
// Dependencies: [1086, 15056, 1403, 1127, 17248, 4850, 2]
|
|
// Exports: showAcceptedNotification, showPendingNotification
|
|
|
|
// Module 17247 (RelationshipUtils)
|
|
import Constants from "Constants" /* 1086 */;
|
|
import intl2 from "intl" /* 1127 */;
|
|
import AvatarUtilsDefault from "AvatarUtils" /* 1403 */;
|
|
import ChannelActionCreatorsDefault from "ChannelActionCreators" /* 4850 */;
|
|
import NotificationActionCreatorsDefault from "NotificationActionCreators" /* 15056 */;
|
|
import FriendsActionCreatorsDefault from "FriendsActionCreators" /* 17248 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const require = globalThis.__r;
|
|
let _require;
|
|
|
|
const FriendsSections = Constants.FriendsSections;
|
|
const result = size.fileFinishedImporting("utils/RelationshipUtils.tsx");
|
|
|
|
export const showPendingNotification = function showPendingNotification(user) {
|
|
const intl = intl2.intl;
|
|
const stringResult = intl.string(intl2.t["t3+Af3"]);
|
|
const showNotification = NotificationActionCreatorsDefault.showNotification;
|
|
NotificationActionCreatorsDefault;
|
|
let obj = AvatarUtilsDefault;
|
|
const obj2 = {
|
|
omitViewTracking: true,
|
|
omitClickTracking: true,
|
|
tag: user.id,
|
|
onClick: () => {
|
|
const obj = FriendsActionCreatorsDefault;
|
|
obj.transitionToSection(constants.PENDING, { explicit: true });
|
|
},
|
|
isUserAvatar: true
|
|
};
|
|
showNotification(obj.getUserAvatarURL(user), user.username, stringResult, {}, obj2);
|
|
};
|
|
export const showAcceptedNotification = function showAcceptedNotification(user) {
|
|
_require = user;
|
|
const intl = require("intl").intl;
|
|
const stringResult = intl.string(require("intl").t.MYr3Ka);
|
|
const showNotification = NotificationActionCreatorsDefault.showNotification;
|
|
NotificationActionCreatorsDefault;
|
|
let obj = AvatarUtilsDefault;
|
|
let obj2 = {
|
|
omitViewTracking: true,
|
|
omitClickTracking: true,
|
|
tag: user.id,
|
|
onClick: () => {
|
|
const obj = ChannelActionCreatorsDefault;
|
|
const obj2 = { recipientIds: user.id };
|
|
obj.openPrivateChannel(obj2);
|
|
},
|
|
isUserAvatar: true
|
|
};
|
|
showNotification(obj.getUserAvatarURL(user), user.username, stringResult, {}, obj2);
|
|
};
|