MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / extractForwardedMessages

Function extractForwardedMessages

bs/bs.ts:425–441  ·  view source on GitHub ↗
(result: Api.TypeUpdates)

Source from the content-addressed store, hash-verified

423}
424
425function extractForwardedMessages(result: Api.TypeUpdates): Api.Message[] {
426 const forwarded: Api.Message[] = [];
427 if ("updates" in result) {
428 for (const update of result.updates) {
429 if (
430 update instanceof Api.UpdateNewMessage ||
431 update instanceof Api.UpdateNewChannelMessage
432 ) {
433 const { message } = update;
434 if (message instanceof Api.Message) {
435 forwarded.push(message);
436 }
437 }
438 }
439 }
440 return forwarded;
441}
442
443async function forwardToTarget(options: {
444 client: any;

Callers 1

forwardToTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected