-
Notifications
You must be signed in to change notification settings - Fork 15
v2.chat.new
cyperdark edited this page May 23, 2023
·
1 revision
Send new message to user
v2.chat.new(target_id, message, is_action, uuid)
Parameter | Type | Description |
---|---|---|
target_id | string |
User id to start PM with |
message | string |
message to send |
is_action | boolean |
whether the message is an action |
uuid | string |
client-side message identifier which will be sent back in response and websocket json |
export interface response {
channel: {
channel_id: number;
description: string;
icon: string;
moderated: boolean;
name: string;
type: string;
uuid: string;
last_message_id: number;
users: number[];
};
message: {
channel_id: number;
content: string;
is_action: boolean;
message_id: number;
sender_id: number;
timestamp: string;
type: string;
sender: {
avatar_url: string;
country_code: string;
default_group: string;
id: number;
is_active: boolean;
is_bot: boolean;
is_deleted: boolean;
is_online: boolean;
is_supporter: boolean;
last_visit: string;
pm_friends_only: boolean;
profile_colour: string;
username: string;
};
};
new_channel_id: number;
}