@plusscommunities/pluss-circles-app 8.0.4 → 8.0.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/actions/ChatActions.js +3 -3
- package/dist/module/actions/ChatActions.js.map +1 -1
- package/dist/module/actions/GroupActions.js +18 -18
- package/dist/module/actions/GroupActions.js.map +1 -1
- package/dist/module/actions/index.js +3 -3
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +2 -2
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/assets/fonts.js +1 -1
- package/dist/module/assets/fonts.js.map +1 -1
- package/dist/module/components/chat/Chat.js +83 -101
- package/dist/module/components/chat/Chat.js.map +1 -1
- package/dist/module/components/chat/ChatList.js +49 -49
- package/dist/module/components/chat/ChatList.js.map +1 -1
- package/dist/module/components/chat/ContactsList.js +21 -21
- package/dist/module/components/chat/ContactsList.js.map +1 -1
- package/dist/module/components/chat/KioskPeoplePage.js +38 -37
- package/dist/module/components/chat/KioskPeoplePage.js.map +1 -1
- package/dist/module/components/chat/PeopleContainer.js +5 -5
- package/dist/module/components/chat/PeopleContainer.js.map +1 -1
- package/dist/module/components/chat/PeoplePage.js +41 -41
- package/dist/module/components/chat/PeoplePage.js.map +1 -1
- package/dist/module/components/common/SwipeableUserListing.js +22 -22
- package/dist/module/components/common/SwipeableUserListing.js.map +1 -1
- package/dist/module/components/common/index.js +2 -2
- package/dist/module/components/common/index.js.map +1 -1
- package/dist/module/components/events/EventInvitePopup.js +40 -40
- package/dist/module/components/events/EventInvitePopup.js.map +1 -1
- package/dist/module/components/groups/EditGroup.js +62 -62
- package/dist/module/components/groups/EditGroup.js.map +1 -1
- package/dist/module/components/groups/GroupDetails.js +32 -32
- package/dist/module/components/groups/GroupDetails.js.map +1 -1
- package/dist/module/components/groups/GroupsList.js +10 -10
- package/dist/module/components/groups/GroupsList.js.map +1 -1
- package/dist/module/components/groups/GroupsWidget.js +18 -18
- package/dist/module/components/groups/GroupsWidget.js.map +1 -1
- package/dist/module/components/groups/NewGroup.js +101 -101
- package/dist/module/components/groups/NewGroup.js.map +1 -1
- package/dist/module/components/groups/PublicGroup.js +17 -17
- package/dist/module/components/groups/PublicGroup.js.map +1 -1
- package/dist/module/components/groups/PublicGroupAction.js +39 -39
- package/dist/module/components/groups/PublicGroupAction.js.map +1 -1
- package/dist/module/components/notifications/GroupInvite.js +25 -25
- package/dist/module/components/notifications/GroupInvite.js.map +1 -1
- package/dist/module/components/notifications/GroupInviteAction.js +44 -44
- package/dist/module/components/notifications/GroupInviteAction.js.map +1 -1
- package/dist/module/components/notifications/GroupMessage.js +17 -17
- package/dist/module/components/notifications/GroupMessage.js.map +1 -1
- package/dist/module/components/takeover/TakeoverBackground.js +5 -5
- package/dist/module/components/takeover/TakeoverBackground.js.map +1 -1
- package/dist/module/config/index.js +2 -2
- package/dist/module/config/index.js.map +1 -1
- package/dist/module/core.config.js +1 -1
- package/dist/module/core.config.js.map +1 -1
- package/dist/module/feature.config.js +27 -27
- package/dist/module/feature.config.js.map +1 -1
- package/dist/module/index.js +14 -14
- package/dist/module/index.js.map +1 -1
- package/dist/module/js/Colors.js +1 -1
- package/dist/module/js/Colors.js.map +1 -1
- package/dist/module/js/NavigationService.js +1 -1
- package/dist/module/js/NavigationService.js.map +1 -1
- package/dist/module/js/Styles.js +1 -1
- package/dist/module/js/Styles.js.map +1 -1
- package/dist/module/js/circles/MapStateToDirectMessages.js +2 -2
- package/dist/module/js/circles/MapStateToDirectMessages.js.map +1 -1
- package/dist/module/js/index.js +3 -3
- package/dist/module/js/index.js.map +1 -1
- package/dist/module/reducers/ChatsReducer.js +4 -4
- package/dist/module/reducers/ChatsReducer.js.map +1 -1
- package/dist/module/reducers/GroupsReducer.js +5 -5
- package/dist/module/reducers/GroupsReducer.js.map +1 -1
- package/dist/module/reducers/reducerKeys.js +1 -1
- package/dist/module/reducers/reducerKeys.js.map +1 -1
- package/dist/module/values.config.default.js +25 -25
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.groups.js +25 -25
- package/dist/module/values.config.groups.js.map +1 -1
- package/dist/module/values.config.js +25 -25
- package/dist/module/values.config.js.map +1 -1
- package/dist/module/webapi/circleActions.js +31 -31
- package/dist/module/webapi/circleActions.js.map +1 -1
- package/dist/module/webapi/helper.js +1 -1
- package/dist/module/webapi/helper.js.map +1 -1
- package/dist/module/webapi/index.js +3 -3
- package/dist/module/webapi/index.js.map +1 -1
- package/dist/module/webapi/messageActions.js +10 -10
- package/dist/module/webapi/messageActions.js.map +1 -1
- package/package.json +54 -54
- package/src/actions/ChatActions.js +55 -55
- package/src/actions/GroupActions.js +245 -237
- package/src/actions/index.js +3 -3
- package/src/actions/types.js +2 -2
- package/src/assets/fonts.js +1 -1
- package/src/components/chat/Chat.js +730 -669
- package/src/components/chat/ChatList.js +603 -512
- package/src/components/chat/ContactsList.js +186 -169
- package/src/components/chat/KioskPeoplePage.js +315 -291
- package/src/components/chat/PeopleContainer.js +14 -14
- package/src/components/chat/PeoplePage.js +450 -383
- package/src/components/common/SwipeableUserListing.js +118 -106
- package/src/components/common/index.js +2 -2
- package/src/components/events/EventInvitePopup.js +587 -505
- package/src/components/groups/EditGroup.js +607 -538
- package/src/components/groups/GroupDetails.js +385 -305
- package/src/components/groups/GroupsList.js +91 -79
- package/src/components/groups/GroupsWidget.js +122 -116
- package/src/components/groups/NewGroup.js +758 -639
- package/src/components/groups/PublicGroup.js +129 -101
- package/src/components/groups/PublicGroupAction.js +312 -244
- package/src/components/notifications/GroupInvite.js +167 -139
- package/src/components/notifications/GroupInviteAction.js +371 -273
- package/src/components/notifications/GroupMessage.js +110 -102
- package/src/components/takeover/TakeoverBackground.js +24 -18
- package/src/config/index.js +4 -4
- package/src/core.config.js +27 -3
- package/src/feature.config.js +257 -245
- package/src/index.js +24 -21
- package/src/js/Colors.js +5 -3
- package/src/js/NavigationService.js +5 -4
- package/src/js/Styles.js +1 -1
- package/src/js/circles/MapStateToDirectMessages.js +6 -6
- package/src/js/index.js +3 -3
- package/src/reducers/ChatsReducer.js +66 -53
- package/src/reducers/GroupsReducer.js +203 -190
- package/src/reducers/reducerKeys.js +1 -1
- package/src/values.config.default.js +29 -29
- package/src/values.config.groups.js +29 -29
- package/src/values.config.js +29 -29
- package/src/webapi/circleActions.js +109 -109
- package/src/webapi/helper.js +1 -1
- package/src/webapi/index.js +3 -3
- package/src/webapi/messageActions.js +47 -47
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
const values = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
featureKey: "groups",
|
|
3
|
+
entityKey: "group",
|
|
4
|
+
entityName: "group",
|
|
5
|
+
serviceKey: "groups",
|
|
6
|
+
permission: "groups",
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
reducerKey: "groups",
|
|
9
|
+
reducerKeyChats: "groupChats",
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
actionCircleKey: "GROUP",
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
screenNewCircle: "newGroup",
|
|
14
|
+
screenCircleDetails: "groupDetails",
|
|
15
|
+
screenEditCircle: "editGroup",
|
|
16
|
+
screenCirclePeopleContainer: "groupPeopleContainer",
|
|
17
|
+
screenCircleChat: "groupChat",
|
|
18
|
+
screenCircleChatList: "groupChatList",
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
notificationInvite: "GroupInvite",
|
|
21
|
+
notificationMessage: "GroupChat",
|
|
22
|
+
notificationDirectMessage: "GroupProfileChat",
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
textFeatureTitle: "Groups",
|
|
25
|
+
textAddMenuTitle: "Group",
|
|
26
|
+
textEmptyGroups: "You aren't in any Groups",
|
|
27
|
+
textEmptyPeople: "Contacts will show here",
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
inviteKey: "groupInvite",
|
|
30
|
+
messageKey: "groupMessage",
|
|
31
|
+
chatRoute: "groupChat",
|
|
32
|
+
updateKeyUserCircles: "userGroups",
|
|
33
|
+
allowPublicKey: "groupAllowPublicGroups",
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
settings: {
|
|
36
|
+
allowAnyCreate: true,
|
|
37
|
+
},
|
|
38
38
|
};
|
|
39
39
|
exports.values = values;
|
package/src/values.config.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
const values = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
featureKey: "circles",
|
|
3
|
+
entityKey: "circle",
|
|
4
|
+
entityName: "circle",
|
|
5
|
+
serviceKey: "circles",
|
|
6
|
+
permission: "circles",
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
reducerKey: "circles",
|
|
9
|
+
reducerKeyChats: "circleChats",
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
actionCircleKey: "CIRCLE",
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
screenNewCircle: "newCircle",
|
|
14
|
+
screenCircleDetails: "circleDetails",
|
|
15
|
+
screenEditCircle: "editCircle",
|
|
16
|
+
screenCirclePeopleContainer: "circlePeopleContainer",
|
|
17
|
+
screenCircleChat: "circleChat",
|
|
18
|
+
screenCircleChatList: "circleChatList",
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
notificationInvite: "CircleInvite",
|
|
21
|
+
notificationMessage: "CircleChat",
|
|
22
|
+
notificationDirectMessage: "CircleProfileChat",
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
textFeatureTitle: "Circles",
|
|
25
|
+
textAddMenuTitle: "Circle",
|
|
26
|
+
textEmptyGroups: "You aren't in any Circles",
|
|
27
|
+
textEmptyPeople: "Contacts will show here",
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
inviteKey: "circleInvite",
|
|
30
|
+
messageKey: "circleMessage",
|
|
31
|
+
chatRoute: "circleChat",
|
|
32
|
+
updateKeyUserCircles: "userCircles",
|
|
33
|
+
allowPublicKey: "circleAllowPublicCircles",
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
settings: {
|
|
36
|
+
allowAnyCreate: false,
|
|
37
|
+
},
|
|
38
38
|
};
|
|
39
39
|
exports.values = values;
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { values } from
|
|
2
|
-
import { getUrl } from
|
|
3
|
-
import { authedFunction } from
|
|
1
|
+
import { values } from "../values.config";
|
|
2
|
+
import { getUrl } from "./helper";
|
|
3
|
+
import { authedFunction } from "../js";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
6
|
+
add: (site, title, image, audience, isPublic) => {
|
|
7
|
+
return authedFunction({
|
|
8
|
+
method: "POST",
|
|
9
|
+
url: getUrl(values.serviceKey, "update/add"),
|
|
10
|
+
data: {
|
|
11
|
+
site,
|
|
12
|
+
title,
|
|
13
|
+
image,
|
|
14
|
+
audience,
|
|
15
|
+
isPublic,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
getDirect: (site, userId) => {
|
|
20
|
+
return authedFunction({
|
|
21
|
+
method: "GET",
|
|
22
|
+
url: getUrl(values.serviceKey, "get/direct", { site, userId }),
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
getFiles: (circleId) => {
|
|
26
|
+
return authedFunction({
|
|
27
|
+
method: "GET",
|
|
28
|
+
url: getUrl(values.serviceKey, "get/files", { circleId }),
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
getImages: (circleId) => {
|
|
32
|
+
return authedFunction({
|
|
33
|
+
method: "GET",
|
|
34
|
+
url: getUrl(values.serviceKey, "get/images", { circleId }),
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
clearGroupUnread: async (groupID, userID) => {
|
|
38
|
+
return authedFunction({
|
|
39
|
+
method: "POST",
|
|
40
|
+
url: getUrl(values.serviceKey, "resetunread"),
|
|
41
|
+
data: { groupID, userID },
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
createGroup: async (group) => {
|
|
45
|
+
return authedFunction({
|
|
46
|
+
method: "POST",
|
|
47
|
+
url: getUrl(values.serviceKey, "createNewGroup"),
|
|
48
|
+
data: { group },
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
getGroups: async (includeArchived = false) => {
|
|
52
|
+
return authedFunction({
|
|
53
|
+
method: "POST",
|
|
54
|
+
url: getUrl(values.serviceKey, "getUsersGroups"),
|
|
55
|
+
data: { includeArchived },
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
archiveGroup: async (groupId, archive = true) => {
|
|
59
|
+
return authedFunction({
|
|
60
|
+
method: "POST",
|
|
61
|
+
url: getUrl(values.serviceKey, "update/archive"),
|
|
62
|
+
data: { groupId, archive },
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
getGroupInvites: async (UserID, token) => {
|
|
66
|
+
return authedFunction({
|
|
67
|
+
method: "POST",
|
|
68
|
+
url: getUrl(values.serviceKey, "getGroupInvites"),
|
|
69
|
+
data: { UserID },
|
|
70
|
+
headers: { authorization: token },
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
inviteUserToGroup: async (group, userID, userName, invites) => {
|
|
74
|
+
return authedFunction({
|
|
75
|
+
method: "POST",
|
|
76
|
+
url: getUrl(values.serviceKey, "inviteToGroup"),
|
|
77
|
+
data: { group, invites },
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
muteGroup: async (groupID) => {
|
|
81
|
+
return authedFunction({
|
|
82
|
+
method: "POST",
|
|
83
|
+
url: getUrl(values.serviceKey, "muteGroup"),
|
|
84
|
+
data: { groupID },
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
actionGroupInvite: async (invite, action) => {
|
|
88
|
+
return authedFunction({
|
|
89
|
+
method: "POST",
|
|
90
|
+
url: getUrl(values.serviceKey, "handleGroupInvite"),
|
|
91
|
+
data: {
|
|
92
|
+
inviteID: invite.Id,
|
|
93
|
+
action,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
getPublicGroups: async (site) => {
|
|
98
|
+
return authedFunction({
|
|
99
|
+
method: "GET",
|
|
100
|
+
url: getUrl(values.serviceKey, "getpublic", { site }),
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
joinGroup: async (groupId) => {
|
|
104
|
+
return authedFunction({
|
|
105
|
+
method: "POST",
|
|
106
|
+
url: getUrl(values.serviceKey, "join"),
|
|
107
|
+
data: {
|
|
108
|
+
groupId,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
112
|
};
|
package/src/webapi/helper.js
CHANGED
package/src/webapi/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Apis } from
|
|
1
|
+
import { Apis } from "../core.config";
|
|
2
2
|
|
|
3
3
|
export const userActions = Apis.userActions;
|
|
4
4
|
export const contactActions = Apis.contactActions;
|
|
5
5
|
export const eventActions = Apis.eventActions;
|
|
6
6
|
|
|
7
|
-
export { default as circleActions } from
|
|
8
|
-
export * from
|
|
7
|
+
export { default as circleActions } from "./circleActions";
|
|
8
|
+
export * from "./messageActions";
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import _ from
|
|
2
|
-
import { values } from
|
|
3
|
-
import { getUrl, getAuthTokenHeader } from
|
|
4
|
-
import { authedFunction } from
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { values } from "../values.config";
|
|
3
|
+
import { getUrl, getAuthTokenHeader } from "./helper";
|
|
4
|
+
import { authedFunction } from "../js";
|
|
5
5
|
|
|
6
6
|
export const messageActions = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
7
|
+
getMessages: async (groupId, limit, minTime, maxTime) => {
|
|
8
|
+
const query = { groupId };
|
|
9
|
+
if (!_.isUndefined(minTime)) {
|
|
10
|
+
query.minTime = minTime;
|
|
11
|
+
}
|
|
12
|
+
if (!_.isUndefined(maxTime)) {
|
|
13
|
+
query.maxTime = maxTime;
|
|
14
|
+
}
|
|
15
|
+
if (limit) {
|
|
16
|
+
query.limit = limit;
|
|
17
|
+
}
|
|
18
|
+
const request = {
|
|
19
|
+
method: "GET",
|
|
20
|
+
url: getUrl(values.serviceKey, "getMessages", query),
|
|
21
|
+
headers: {},
|
|
22
|
+
};
|
|
23
|
+
request.headers.authorization = await getAuthTokenHeader();
|
|
24
|
+
return authedFunction(request);
|
|
25
|
+
},
|
|
26
|
+
sendMessage: async (userID, chatKey, groupLast, message) => {
|
|
27
|
+
const request = {
|
|
28
|
+
method: "post",
|
|
29
|
+
url: getUrl(values.serviceKey, "sendMessage"),
|
|
30
|
+
data: {
|
|
31
|
+
groupId: chatKey,
|
|
32
|
+
message,
|
|
33
|
+
},
|
|
34
|
+
headers: {},
|
|
35
|
+
};
|
|
36
|
+
request.headers.authorization = await getAuthTokenHeader();
|
|
37
|
+
return authedFunction(request);
|
|
38
|
+
},
|
|
39
|
+
deleteMessage: async (messageId, groupId) => {
|
|
40
|
+
const request = {
|
|
41
|
+
method: "post",
|
|
42
|
+
url: getUrl(values.serviceKey, "update/deletemessage"),
|
|
43
|
+
data: {
|
|
44
|
+
messageId,
|
|
45
|
+
groupId,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
return authedFunction(request);
|
|
49
|
+
},
|
|
50
50
|
};
|