feat: 后台增加开放消息开关
关闭后前台隐藏私聊/群聊入口并由后端拦截;同步去掉公告页重复计数胶囊。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -56,7 +56,9 @@ export default async function UserPage({ params, searchParams }: UserPageProps)
|
||||
|
||||
const cookie = authCookieHeader(await cookies());
|
||||
const me = await getMeCached(cookie || undefined);
|
||||
const allowComments = (await getPublicSettingsCached()).allow_comments !== false;
|
||||
const settings = await getPublicSettingsCached();
|
||||
const allowComments = settings.allow_comments !== false;
|
||||
const allowMessages = settings.allow_messages !== false;
|
||||
|
||||
let data: UserProfile;
|
||||
try {
|
||||
@@ -172,7 +174,7 @@ export default async function UserPage({ params, searchParams }: UserPageProps)
|
||||
banned: u.banned,
|
||||
}}
|
||||
/>
|
||||
<StartDMButton userId={data.user.id} />
|
||||
{allowMessages ? <StartDMButton userId={data.user.id} /> : null}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user