ruwa 1.0.0

Rust client for WhatsApp Web
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::sync::OnceLock;
use wacore_binary_ng::jid::{Jid, SERVER_JID};

static SERVER_JID_CACHE: OnceLock<Jid> = OnceLock::new();

pub fn server_jid() -> Jid {
    SERVER_JID_CACHE
        .get_or_init(|| {
            SERVER_JID
                .parse()
                .expect("SERVER_JID constant must parse into a valid JID")
        })
        .clone()
}