( other_uid, uid, fb_dtsg, pageFetchedCallback )
| 550 | } |
| 551 | } |
| 552 | export async function searchAllGroupForOther( |
| 553 | other_uid, |
| 554 | uid, |
| 555 | fb_dtsg, |
| 556 | pageFetchedCallback |
| 557 | ) { |
| 558 | let cursor = ""; |
| 559 | let allGroups = []; |
| 560 | try { |
| 561 | while (true) { |
| 562 | let { nextCursor, data } = await searchGroupForOther( |
| 563 | other_uid, |
| 564 | cursor, |
| 565 | uid, |
| 566 | fb_dtsg |
| 567 | ); |
| 568 | cursor = nextCursor; |
| 569 | allGroups = allGroups.concat(data); |
| 570 | await pageFetchedCallback?.(data, allGroups); |
| 571 | |
| 572 | if (!cursor) break; |
| 573 | } |
| 574 | } catch (e) { |
| 575 | console.log("ERROR search all group for other", e); |
| 576 | } |
| 577 | return allGroups; |
| 578 | } |
| 579 | |
| 580 | // ============================================================================= |
| 581 | // ================================== Helpers ================================== |
no test coverage detected