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 +4 -0
- package/dist/client.d.ts +2 -0
- package/dist/socket.d.ts +4 -4
- package/package.json +1 -1
- package/socket.ts +5 -5
package/client.ts
CHANGED
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 {
|
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:
|
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:
|
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
package/socket.ts
CHANGED
@@ -14,9 +14,9 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import {
|
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:
|
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:
|
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:
|
1067
|
+
onchannelmessage(channelMessage: ChannelMessage) {
|
1068
1068
|
if (this.verbose && window && window.console) {
|
1069
1069
|
console.log(channelMessage);
|
1070
1070
|
}
|