Fix own name being added to the buddy list

This commit is contained in:
mjentsch 2015-11-16 15:43:32 +01:00
parent a77adfaf0d
commit 8ee4f680c2

View file

@ -338,6 +338,11 @@ static void on_get_dialog_list_done (struct tgl_state *TLS, void *callback_extra
for (; i >= 0; i--) {
tgl_peer_t *UC = tgl_peer_get (TLS, peers[i]);
// our own contact shouldn't show up in our buddy list
if (tgl_get_peer_id (UC->id) == tgl_get_peer_id (TLS->our_id)) {
continue;
}
switch (tgl_get_peer_type (peers[i])) {
case TGL_PEER_USER:
assert (UC);