Commit a0961fcc authored by Vysheng's avatar Vysheng

changed user#... to user#id...

parent 6800cf46
......@@ -151,6 +151,13 @@ tgl_peer_id_t next_token_user (void) {
if (r >= 0) { return tgl_set_peer_id (TGL_PEER_USER, r); }
else { return TGL_PEER_NOT_FOUND; }
}
if (l >= 8 && !memcmp (s, "user#id", 7)) {
s += 7;
l -= 7;
int r = atoi (s);
if (r >= 0) { return tgl_set_peer_id (TGL_PEER_USER, r); }
else { return TGL_PEER_NOT_FOUND; }
}
char c = s[l];
s[l] = 0;
......@@ -176,6 +183,14 @@ tgl_peer_id_t next_token_chat (void) {
if (r >= 0) { return tgl_set_peer_id (TGL_PEER_CHAT, r); }
else { return TGL_PEER_NOT_FOUND; }
}
if (l >= 8 && !memcmp (s, "chat#id", 7)) {
s += 7;
l -= 7;
int r = atoi (s);
if (r >= 0) { return tgl_set_peer_id (TGL_PEER_CHAT, r); }
else { return TGL_PEER_NOT_FOUND; }
}
char c = s[l];
s[l] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment