fix: sending locations (#2339)
* added function to to modify module functions * fix for locations to be sent * changes for class Location - description property was splited into name and address - added url property - added ability to pass name, address and url as options while creating an instance * docs updated * usage example updated * added url checking * fixed url * updated location property in Message class * fixed url when http prefix is provided * injectToFunction updated to be more flexible * docs clarification * ESLint fix * fix: injectToFunction fixed to work properly * minor fix in injectToFunction * refactor: added usage of url validator * small change to improve performance for findImpl fix * window.compareWwebVersions fixed
This commit is contained in:
parent
1c059d3b3d
commit
ecf19eb9a5
1 changed files with 117 additions and 20 deletions
18
index.d.ts
vendored
18
index.d.ts
vendored
|
|
@ -879,13 +879,23 @@ declare namespace WAWebJS {
|
|||
_serialized: string,
|
||||
}
|
||||
|
||||
/** Options for sending a location */
|
||||
export interface LocationSendOptions {
|
||||
/** Location name */
|
||||
name?: string;
|
||||
/** Location address */
|
||||
address?: string;
|
||||
/** URL address to be shown within a location message */
|
||||
url?: string;
|
||||
}
|
||||
|
||||
/** Location information */
|
||||
export class Location {
|
||||
description?: string | null
|
||||
latitude: string
|
||||
longitude: string
|
||||
latitude: string;
|
||||
longitude: string;
|
||||
options?: LocationSendOptions;
|
||||
|
||||
constructor(latitude: number, longitude: number, description?: string)
|
||||
constructor(latitude: number, longitude: number, options?: LocationSendOptions)
|
||||
}
|
||||
|
||||
export interface Label {
|
||||
|
|
|
|||
Loading…
Reference in a new issue