from ? htmlspecialchars($message->from) : $message->from_id); } function colorfromid ( $id ) { if ( ($id = (int)(substr( $id, -2 ) * 0.07)) === 7 ) { $id = 0; } return $id; } function getreplytoid ( $message ) { return (property_exists( $message, 'reply_to_message_id' ) ? $message->reply_to_message_id : null); } function renderquotemessage ( $chat, $message ) { global $tmeroot; ?>
id, $chat->threads ) ) { foreach ( $chat->threads[$message->id] as $childid ) { ?> div.tgme_head { display: revert; white-space: nowrap; overflow-x: auto; } div.tgme_head > h1 { display: inline-block; margin: 8px; } div.tgme_widget_reply { padding-left: 1em; padding-right: 1em; } div.tgme_widget_reply > div.tgme_widget_message { padding-top: 2em; } div.tgme_page_widget > div.tgme_widget_replies { margin-top: 2em; border-top: 2px solid gray; } div.tgme_page_widget_actions_wrap { position: sticky; bottom: 2em; padding-top: 2em; } div.tgme_page_widget_actions_wrap span.tgme_action_button_label { display: initial; } div.tgme_widget_message_bubble.tgme_widget_message_bubble_quoting { border-radius: 10px 10px 10px 10px; margin-bottom: 2em; margin-left: 4em; margin-right: 4em; opacity: 80%; } div.tgme_widget_message_bubble.tgme_widget_message_bubble_quoting div.tgme_widget_message_text { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; opacity: 60%; }var tme_bg = document.getElementById('tgme_background'); if (tme_bg) { TWallpaper.init(tme_bg); TWallpaper.animate(true); window.addEventListener('focus', TWallpaper.update); } document.body.classList.remove('no_transition'); function toggleTheme (dark) { document.documentElement.classList.toggle('theme_dark', dark); window.Telegram && Telegram.setWidgetOptions({ dark: dark }); } if (window.matchMedia) { var darkMedia = window.matchMedia('(prefers-color-scheme: dark)'); toggleTheme(darkMedia.matches); darkMedia.addListener(function(e) { toggleTheme(e.matches); }); }messages; $chat->messages = []; $chat->threads = []; foreach ( $oldmessages as $message ) { if ( $message->type === 'service' ) { continue; } if ( !$firstmessageurl ) { $firstmessageurl = "{$tmeroot}/{$chat->id}/{$message->id}/"; } $chat->messages[$message->id] = $message; if ( $replytoid = getreplytoid($message) ) { if ( !array_key_exists( $replytoid, $chat->threads ) ) { $chat->threads[$replytoid] = []; } array_push( $chat->threads[$replytoid], $message->id ); } } $title = (htmlspecialchars($chat->name) . ' - Redirect'); $STDOUT = fopen( "{$output}index.html", 'w' ); ?>