hotfix: newId and deviceType (#2196)
* update method generate Msg id, newId to newIdV2 * replace newId and await in version WA 2.2321.6 * fix deviceType
This commit is contained in:
parent
d8fd457914
commit
081b455fa5
1 changed files with 4 additions and 4 deletions
|
|
@ -89,8 +89,7 @@ class Message extends Base {
|
|||
* String that represents from which device type the message was sent
|
||||
* @type {string}
|
||||
*/
|
||||
this.deviceType = data.id.id.length > 21 ? 'android' : data.id.id.substring(0, 2) == '3A' ? 'ios' : 'web';
|
||||
|
||||
this.deviceType = typeof data.id.id === 'string' && data.id.id.length > 21 ? 'android' : typeof data.id.id === 'string' && data.id.id.substring(0, 2) === '3A' ? 'ios' : 'web';
|
||||
/**
|
||||
* Indicates if the message was forwarded
|
||||
* @type {boolean}
|
||||
|
|
|
|||
Loading…
Reference in a new issue