mezon-js 2.8.35 → 2.8.36

Sign up to get free protection for your applications and to get access to all the features.
package/client.ts CHANGED
@@ -243,6 +243,10 @@ export interface ChannelMessage {
243
243
  create_time_ms?: number;
244
244
  //
245
245
  update_time_ms?: number;
246
+ //
247
+ mode?: number;
248
+ //
249
+ message_id?: string;
246
250
  }
247
251
 
248
252
  /** A list of channel messages, usually a result of a list operation. */
package/dist/client.d.ts CHANGED
@@ -117,6 +117,8 @@ export interface ChannelMessage {
117
117
  display_name?: string;
118
118
  create_time_ms?: number;
119
119
  update_time_ms?: number;
120
+ mode?: number;
121
+ message_id?: string;
120
122
  }
121
123
  /** A list of channel messages, usually a result of a list operation. */
122
124
  export interface ChannelMessageList {
package/dist/socket.d.ts CHANGED
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiChannelMessage, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc } from "./api.gen";
16
+ import { ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc } from "./api.gen";
17
17
  import { Session } from "./session";
18
- import { Notification } from "./client";
18
+ import { ChannelMessage, Notification } from "./client";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
20
20
  /** An object which represents a connected user in the server. */
21
21
  export interface Presence {
@@ -505,7 +505,7 @@ export interface Socket {
505
505
  onheartbeattimeout: () => void;
506
506
  oncustomstatus: (statusEvent: CustomStatusEvent) => void;
507
507
  /** Receive channel message. */
508
- onchannelmessage: (channelMessage: ApiChannelMessage) => void;
508
+ onchannelmessage: (channelMessage: ChannelMessage) => void;
509
509
  /** Receive typing event */
510
510
  onmessagetyping: (messageTypingEvent: MessageTypingEvent) => void;
511
511
  /** Receive reaction event */
@@ -575,7 +575,7 @@ export declare class DefaultSocket implements Socket {
575
575
  onerror(evt: Event): void;
576
576
  onmessagetyping(messagetyping: MessageTypingEvent): void;
577
577
  onmessagereaction(messagereaction: ApiMessageReaction): void;
578
- onchannelmessage(channelMessage: ApiChannelMessage): void;
578
+ onchannelmessage(channelMessage: ChannelMessage): void;
579
579
  onchannelpresence(channelPresence: ChannelPresenceEvent): void;
580
580
  onuserchanneladded(user: UserChannelAddedEvent): void;
581
581
  onuserprofileupdate(user: UserProfileUpdatedEvent): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.35",
3
+ "version": "2.8.36",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {ApiChannelMessage, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc} from "./api.gen";
17
+ import { ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc} from "./api.gen";
18
18
  import {Session} from "./session";
19
- import {Notification} from "./client";
19
+ import {ChannelMessage, Notification} from "./client";
20
20
  import {WebSocketAdapter, WebSocketAdapterText} from "./web_socket_adapter"
21
21
 
22
22
  /** Stores function references for resolve/reject with a DOM Promise. */
@@ -737,7 +737,7 @@ export interface Socket {
737
737
  oncustomstatus: (statusEvent: CustomStatusEvent) => void;
738
738
 
739
739
  /** Receive channel message. */
740
- onchannelmessage: (channelMessage: ApiChannelMessage) => void;
740
+ onchannelmessage: (channelMessage: ChannelMessage) => void;
741
741
 
742
742
  /** Receive typing event */
743
743
  onmessagetyping: (messageTypingEvent: MessageTypingEvent) => void;
@@ -936,7 +936,7 @@ export class DefaultSocket implements Socket {
936
936
  } catch(e) {
937
937
  //console.log("references is invalid", e);
938
938
  }
939
- var e: ApiChannelMessage = {
939
+ var e: ChannelMessage = {
940
940
  id: message.id,
941
941
  avatar: message.channel_message.avatar,
942
942
  channel_id: message.channel_message.channel_id,
@@ -1064,7 +1064,7 @@ export class DefaultSocket implements Socket {
1064
1064
  }
1065
1065
  }
1066
1066
 
1067
- onchannelmessage(channelMessage: ApiChannelMessage) {
1067
+ onchannelmessage(channelMessage: ChannelMessage) {
1068
1068
  if (this.verbose && window && window.console) {
1069
1069
  console.log(channelMessage);
1070
1070
  }