MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / messagesCount

Function messagesCount

scripts/fb_GLOBAL.js:345–379  ·  view source on GitHub ↗
(fb_dtsg)

Source from the content-addressed store, hash-verified

343// ================================= Messages ==================================
344// =============================================================================
345export async function messagesCount(fb_dtsg) {
346 const res = await fetchGraphQl(
347 `viewer(){
348 message_threads {
349 count,
350 nodes {
351 customization_info {
352 emoji,
353 outgoing_bubble_color,
354 participant_customizations {
355 participant_id,
356 nickname
357 }
358 },
359 all_participants {
360 nodes {
361 messaging_actor {
362 name,
363 id,
364 profile_picture
365 }
366 }
367 },
368 thread_type,
369 name,
370 messages_count,
371 image,
372 id
373 }
374 }
375 }`.replace(/\s+/g, ""),
376 fb_dtsg
377 );
378 return JSON.parse(res);
379}
380
381// =============================================================================
382// =================================== Page ====================================

Callers

nothing calls this directly

Calls 3

replaceMethod · 0.80
parseMethod · 0.80
fetchGraphQlFunction · 0.70

Tested by

no test coverage detected