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

Function buildChatMessageLink

biko/biko.ts:234–249  ·  view source on GitHub ↗
(
  chatEntity: any,
  messageId: number,
)

Source from the content-addressed store, hash-verified

232
233 if (chatEntity?.username) {
234 return `https://t.me/${chatEntity.username}/${messageId}`;
235 }
236
237 if (chatEntity instanceof Api.Channel && chatEntity?.id) {
238 return `https://t.me/c/${chatEntity.id}/${messageId}`;
239 }
240
241 return undefined;
242}
243
244function describeServiceMessage(message: any): string {
245 const actionName = String(message?.action?.className || "")
246 .replace(/^MessageAction/, "")
247 .trim();
248 return actionName ? `[服务消息:${actionName}]` : "[服务消息]";
249}
250
251function describeDocumentMessage(message: any): string {
252 const attributes = Array.isArray(message?.document?.attributes)

Callers 1

collectMessagesOnceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected