File tree Expand file tree Collapse file tree 2 files changed +37
-34
lines changed Expand file tree Collapse file tree 2 files changed +37
-34
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export async function getGroupInfoFromInviteCode(inviteCode: string) {
33
33
inviteCode = inviteCode . replace ( 'https://' , '' ) ;
34
34
inviteCode = inviteCode . replace ( 'http://' , '' ) ;
35
35
36
- const result = await sendQueryGroupInvite ( inviteCode ) . catch ( ( ) => null ) ;
36
+ const result = ( await sendQueryGroupInvite ( inviteCode ) . catch ( ( ) => null ) ) ?. groupInfo ;
37
37
38
38
if ( ! result ) {
39
39
throw new WPPError ( 'invalid_invite_code' , 'Invalid Invite Code' , {
@@ -43,7 +43,7 @@ export async function getGroupInfoFromInviteCode(inviteCode: string) {
43
43
44
44
return {
45
45
...result ,
46
- descOwner : result . descOwner ?. toString ( ) ,
46
+ descOwner : result . subjectOwner ?. toString ( ) ,
47
47
id : result . id . toString ( ) ,
48
48
owner : result . owner ?. toString ( ) ,
49
49
participants : result . participants . map ( ( p ) => ( {
Original file line number Diff line number Diff line change @@ -18,40 +18,43 @@ import { Wid } from '..';
18
18
import { exportModule } from '../exportModule' ;
19
19
20
20
export interface QueryGroupInviteResult {
21
- announce : boolean ;
22
- creation : number ;
23
- /** description of the group; linebreaks are formatted using `"\n"` */
24
- desc : string ;
25
- descId : string ;
26
- descOwner ?: Wid ;
27
- descTime : number ;
28
- id : Wid ;
29
- noFrequentlyForwarded : boolean ;
30
- owner ?: Wid ;
31
- parent : boolean ;
32
- participants : {
21
+ groupInfo : {
22
+ announce : boolean ;
23
+ creation : number ;
24
+ /** description of the group; linebreaks are formatted using `"\n"` */
25
+ desc : string ;
26
+ descId : string ;
27
+ descOwner ?: Wid ;
28
+ descTime : number ;
33
29
id : Wid ;
34
- isAdmin : boolean ;
35
- isSuperAdmin : boolean ;
36
- } [ ] ;
37
- pvId ?: string ;
38
- restrict : boolean ;
39
- /** how many members the group currently has */
40
- size : number ;
30
+ noFrequentlyForwarded : boolean ;
31
+ owner ?: Wid ;
32
+ parent : boolean ;
33
+ participants : {
34
+ id : Wid ;
35
+ isAdmin : boolean ;
36
+ isSuperAdmin : boolean ;
37
+ } [ ] ;
38
+ pvId ?: string ;
39
+ restrict : boolean ;
40
+ /** how many members the group currently has */
41
+ size : number ;
42
+ status : number ;
43
+ /** title of the group */
44
+ subject : string ;
45
+ subjectOwner ?: Wid ;
46
+ subjectTime : number ;
47
+ support : boolean ;
48
+ suspended : boolean ;
49
+ isParentGroup : boolean ;
50
+ isParentGroupClosed : boolean ;
51
+ defaultSubgroup : boolean ;
52
+ generalSubgroup : boolean ;
53
+ membershipApprovalMode : boolean ;
54
+ isLidAddressingMode : boolean ;
55
+ generalChatAutoAddDisabled : boolean ;
56
+ } ;
41
57
status : number ;
42
- /** title of the group */
43
- subject : string ;
44
- subjectOwner ?: Wid ;
45
- subjectTime : number ;
46
- support : boolean ;
47
- suspended : boolean ;
48
- isParentGroup : boolean ;
49
- isParentGroupClosed : boolean ;
50
- defaultSubgroup : boolean ;
51
- generalSubgroup : boolean ;
52
- membershipApprovalMode : boolean ;
53
- isLidAddressingMode : boolean ;
54
- generalChatAutoAddDisabled : boolean ;
55
58
}
56
59
57
60
/** @whatsapp 10790
You can’t perform that action at this time.
0 commit comments