(&self, ctx: &Context<'_>)
| 88 | } |
| 89 | |
| 90 | pub async fn owner(&self, ctx: &Context<'_>) -> Result<Option<User>> { |
| 91 | match self { |
| 92 | Repository::Default => Ok(None), |
| 93 | Repository::Fetched { owner_id, .. } => { |
| 94 | let user = ctx |
| 95 | .data_unchecked::<Store>() |
| 96 | .user(owner_id.to_string()) |
| 97 | .await?; |
| 98 | Ok(user) |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | async fn root_topic(&self, ctx: &Context<'_>) -> Result<Topic> { |
| 104 | ctx.data_unchecked::<Store>() |