mas_handlers/graphql/model/viewer/anonymous.rs
1// Copyright 2024 New Vector Ltd.
2// Copyright 2023, 2024 The Matrix.org Foundation C.I.C.
3//
4// SPDX-License-Identifier: AGPL-3.0-only
5// Please see LICENSE in the repository root for full details.
6
7use async_graphql::{ID, Object};
8
9/// An anonymous viewer
10#[derive(Default, Clone, Copy)]
11pub struct Anonymous;
12
13#[Object]
14impl Anonymous {
15 pub async fn id(&self) -> ID {
16 "anonymous".into()
17 }
18}