use crate::db::notifications::add_metadata;
use crate::db::notifications::{self, delete_ping, move_indices, record_ping, Identifier};
use crate::github::{self, GithubClient};
use crate::handlers::Context;
use anyhow::Context as _;
use std::convert::TryInto;
use std::env;
#[derive(Debug, serde::Deserialize)]
pub struct Request {
/// Markdown body of the sent message.
data: String,
/// Metadata about this request.
message: Message,
/// Authentication token. The same for all Zulip messages.
token: String,
}
#[derive(Debug, serde::Deserialize)]
struct Message {
sender_id: usize,
sender_short_name: String,
sender_full_name: String,
}
#[derive(serde::Serialize, serde::Deserialize)]
struct Response<'a> {
content: &'a str,
}
#[derive(serde::Serialize, serde::Deserialize)]
struct ResponseOwned {
content: String,
}
pub async fn to_github_id(client: &GithubClient, zulip_id: usize) -> anyhow::Result