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

Function getPeerRawId

dme/dme.ts:256–275  ·  view source on GitHub ↗
(peer: any)

Source from the content-addressed store, hash-verified

254 if (peer.channelId !== undefined && peer.channelId !== null) {
255 return peer.channelId.toString();
256 }
257 if (peer.chatId !== undefined && peer.chatId !== null) {
258 return peer.chatId.toString();
259 }
260 if (
261 typeof peer === "bigint" ||
262 typeof peer === "number" ||
263 typeof peer === "string"
264 ) {
265 return peer.toString();
266 }
267 return null;
268}
269
270async function getSendAsIdentitySet(
271 client: TelegramClient,
272 chatEntity: any
273): Promise<{ typedKeys: Set<string>; rawIds: Set<string> }> {
274 const typedKeys = new Set<string>();
275 const rawIds = new Set<string>();
276 try {
277 const sendAs = await client.invoke(
278 new Api.channels.GetSendAs({

Callers 2

getSendAsIdentitySetFunction · 0.85
isMyMessageByIdentityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected