Промежуточно: синхронизировать регистр логинов

This commit is contained in:
AidarKC
2026-10-29 13:10:12 +03:00
parent d2b2876a79
commit 395aa62bda
23 changed files with 312 additions and 42 deletions
+2 -1
View File
@@ -251,7 +251,7 @@ function buildSelectorFromRoute(route, channelId) {
function buildThreadRoute(post, selector) {
const messageRef = post?.messageRef;
if (!messageRef || !selector) return '';
const ownerLogin = extractLoginFromBlockchainName(selector.ownerBlockchainName);
const ownerLogin = String(selector.ownerLogin || extractLoginFromBlockchainName(selector.ownerBlockchainName)).trim();
return makeShineMessageRoute({
ownerLogin,
messageBlockchainName: messageRef.blockchainName,
@@ -1503,6 +1503,7 @@ async function loadFromApi(route, channelId) {
const channelTypeCode = Number(payload.channel?.channelTypeCode ?? 1);
// Channel-publication URLs are only unambiguous for public channels, not merged private chats.
selector.channelName = String(payload.channel?.channelName || selector.channelName || '').trim();
selector.ownerLogin = ownerLogin; // для человекочитаемых ссылок сохраняем регистр регистрации
selector.publicOrdinalUrlsAllowed = channelTypeCode !== CHANNEL_TYPE_STORIES && channelTypeCode !== CHANNEL_TYPE_PERSONAL;
if (channelTypeCode === CHANNEL_TYPE_STORIES) {
throw new Error('Канал stories скрыт из пользовательского интерфейса.');