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

This commit is contained in:
Vysheng 2014-09-03 19:54:50 +04:00
parent 6800cf4665
commit a0961fcc18

View File

@ -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;