NewMessageInfo class
Represents the message for creating a new message.
Constructors
NewMessageInfo({
convId: string,
type: number,
message: {
content: string,
photo: {filePath: string, thumbnail: string, ratio: number},
video: {filePath: string, thumbnail: string, ratio: number, duration: number},
audio: {filePath: string, duration: number},
file: {filePath: string, filename: string, length: number},
location: {lat: number, lon: number},
contact: {vcard: string},
sticker: {category: string, name: string}
}
})
Create a new NewMessageInfo.
Properties
convId: string
It's the unique identifier of the conversation on Stringee system.
type: number
It's type of the message:
- type = 1: Text.
- type = 2: Photo.
- type = 3: Video.
- type = 4: Audio.
- type = 5: File.
- type = 6: Link.
- type = 9: Location.
- type = 10: Contact.
- type = 11: Sticker.
message: {}
It's detail of the message. For each message type, pass in the corresponding parameter:
- content: string
Content of the text/link message.
- photo: {filePath: string, thumbnail: string, ratio: number}
Detail of the photo message.
- filePath: Url of your photo file.
- thumbnail: Thumbnail of your photo file.
- ratio: Ratio of your photo file.
- video: {filePath: string, thumbnail: string, ratio: number, duration: number}
Detail of the video message.
- filePath: Url of your video file.
- thumbnail: Thumbnail of your video file.
- ratio: Ratio of your video file.
- duration: Duration of your video file.
- audio: {filePath: string, duration: number}
Detail of the audio message.
- filePath: Url of your audio file.
- duration: Duration of your audio file.
- file: {filePath: string, filename: string, length: number}
Detail of the file message.
- filePath: Url of your file.
- filename: Name of your file.
- length: Size of your file.
- location: {lat: number, lon: number}
Detail of the location message.
- lat: Your location latitude.
- lon: Your location longitude.
- contact: {vcard: string}
Detail of the contact message.
- vcard: Detail of contact.
- sticker: {category: string, name: string}
Detail of the sticker message.
- category: Your sticker's category.
- name: Your sticker's name.