@wildix/xbees-conversations-utils 1.1.46 → 1.1.47

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.
@@ -112,10 +112,7 @@ function normalizeStreamChannel(channel) {
112
112
  }
113
113
  let context = undefined;
114
114
  if (data.context) {
115
- try {
116
- context = JSON.parse(data.context);
117
- }
118
- catch (e) { }
115
+ context = data.context;
119
116
  }
120
117
  let assignee = undefined;
121
118
  if (data.assignee) {
@@ -104,10 +104,7 @@ export function normalizeStreamChannel(channel) {
104
104
  }
105
105
  let context = undefined;
106
106
  if (data.context) {
107
- try {
108
- context = JSON.parse(data.context);
109
- }
110
- catch (e) { }
107
+ context = data.context;
111
108
  }
112
109
  let assignee = undefined;
113
110
  if (data.assignee) {
@@ -1,5 +1,6 @@
1
1
  import { Channel, ChannelData, ChannelState, ChannelFilters, ChannelMembership, ChannelMemberResponse, ChannelSort, ChannelResponse, Event, ExtendableGenerics, LiteralStringForUnion, Message, MessageResponse, ReactionResponse, SearchAPIResponse, SyncResponse, UR, UserResponse, GetRepliesAPIResponse, GetReactionsAPIResponse, OwnUserResponse, ChannelAPIResponse, User, Reaction, PartialMessageUpdate, UpdatedMessage, PartialUpdateChannel } from 'stream-chat';
2
2
  import { MessageQuote, MessageForward, MessageAttachment, MessageGiphy, User as NormalizedUser, ChannelAccess, MessageSmsStatus, MessageWhatsAppStatus, ChannelWhatsAppStatus, Element } from "@wildix/xbees-conversations-client";
3
+ import { ChannelContext } from "@wildix/xbees-kite-client";
3
4
  export interface StreamChannelFields extends UR {
4
5
  subject?: string;
5
6
  description?: string;
@@ -7,7 +8,7 @@ export interface StreamChannelFields extends UR {
7
8
  picture_color?: string;
8
9
  access?: ChannelAccess;
9
10
  company?: string;
10
- context?: string;
11
+ context?: ChannelContext;
11
12
  kite?: boolean;
12
13
  kite_target?: string;
13
14
  kite_variant?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-conversations-utils",
3
- "version": "1.1.46",
3
+ "version": "1.1.47",
4
4
  "description": "",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",