libsignal_service/websocket/
stickers.rs

1use crate::websocket::{self, SignalWebSocket};
2
3use super::ServiceError;
4
5impl<C: websocket::WebSocketType> SignalWebSocket<C> {
6    pub async fn get_sticker_pack_manifest(
7        &mut self,
8        id: &str,
9    ) -> Result<impl futures::io::AsyncRead + Send + Unpin, ServiceError> {
10        let path = format!("/stickers/{}/manifest.proto", id);
11        self.unidentified_push_service.get_from_cdn(0, &path).await
12    }
13
14    pub async fn get_sticker(
15        &mut self,
16        pack_id: &str,
17        sticker_id: u32,
18    ) -> Result<impl futures::io::AsyncRead + Send + Unpin, ServiceError> {
19        let path = format!("/stickers/{}/full/{}", pack_id, sticker_id);
20        self.unidentified_push_service.get_from_cdn(0, &path).await
21    }
22}