ui: inform guests of restricted interfaces

This commit is contained in:
Evan Carroll 2026-01-19 00:38:37 -06:00
parent 1f922f8221
commit 39750c1d82
8 changed files with 137 additions and 49 deletions

View file

@ -1829,6 +1829,9 @@ pub struct ChannelMemberInfo {
/// Current emotion slot (0-9)
pub current_emotion: i16,
pub joined_at: DateTime<Utc>,
/// Whether this user is a guest (has the 'guest' tag)
#[serde(default)]
pub is_guest: bool,
}
/// Request to update position in a channel.

View file

@ -176,7 +176,8 @@ pub async fn get_channel_members<'e>(
cm.is_moving,
cm.is_afk,
COALESCE(aa.current_emotion, 0::smallint) as current_emotion,
cm.joined_at
cm.joined_at,
COALESCE('guest' = ANY(u.tags), false) as is_guest
FROM scene.instance_members cm
LEFT JOIN auth.users u ON cm.user_id = u.id
LEFT JOIN auth.guest_sessions gs ON cm.guest_session_id = gs.id
@ -214,7 +215,8 @@ pub async fn get_channel_member<'e>(
cm.is_moving,
cm.is_afk,
COALESCE(aa.current_emotion, 0::smallint) as current_emotion,
cm.joined_at
cm.joined_at,
COALESCE('guest' = ANY(u.tags), false) as is_guest
FROM scene.instance_members cm
LEFT JOIN auth.users u ON cm.user_id = u.id
LEFT JOIN auth.active_avatars aa ON cm.user_id = aa.user_id AND aa.realm_id = $3