diff --git a/telegram-adium/TelegramAccount.m b/telegram-adium/TelegramAccount.m index e9dbc4c..f48d684 100644 --- a/telegram-adium/TelegramAccount.m +++ b/telegram-adium/TelegramAccount.m @@ -53,6 +53,8 @@ [super didConnect]; [self purpleAccount]; + // FIXME: Crashed after going online + // Storing chats in the blist breaks Adium bookmarks. Adium doesn't // show those chats anyway, so we can just safely delete those. PurpleBlistNode *node = purple_blist_get_root(); diff --git a/telegram-purple.c b/telegram-purple.c index dfd343e..1997754 100644 --- a/telegram-purple.c +++ b/telegram-purple.c @@ -71,14 +71,11 @@ static void _update_buddy (struct tgl_state *TLS, tgl_peer_t *user, unsigned fla if (flags & TGL_UPDATE_DELETED) { debug ("update deleted"); purple_blist_remove_buddy (buddy); - } else { - if (flags & TGL_UPDATE_CONTACT) { debug ("update contact"); purple_blist_alias_buddy (buddy, user->print_name); } - if (flags & TGL_UPDATE_PHOTO) { debug ("update photo"); tgp_info_update_photo (buddy, user); diff --git a/tgp-chat.c b/tgp-chat.c index 9389b0b..0a055b8 100644 --- a/tgp-chat.c +++ b/tgp-chat.c @@ -245,11 +245,9 @@ void tgprpl_chat_join (PurpleConnection *gc, GHashTable *data) { void *value = g_hash_table_lookup (data, "id"); if (value && atoi (value)) { tgl_peer_t *P = tgl_peer_get (gc_get_tls (gc), TGL_MK_CHAT(atoi (value))); - if (! P) { P = tgl_peer_get (gc_get_tls (gc), TGL_MK_CHANNEL(atoi (value))); } - if (P) { debug ("type=%d", tgl_get_peer_type (P->id)); if (tgl_get_peer_type (P->id) == TGL_PEER_CHAT) { diff --git a/tgp-ft.c b/tgp-ft.c index ca72430..341bb17 100644 --- a/tgp-ft.c +++ b/tgp-ft.c @@ -90,6 +90,8 @@ static void tgprpl_xfer_recv_on_finished (struct tgl_state *TLS, void *_data, in debug ("moving transferred file from tgl directory %s to selected target %s", selected, filename); g_unlink (selected); + + //FIXME: try to copy when this fails g_rename (filename, selected); g_free (selected); } diff --git a/tgp-msg.c b/tgp-msg.c index 9db1720..8a4f491 100644 --- a/tgp-msg.c +++ b/tgp-msg.c @@ -239,6 +239,7 @@ static int tgp_msg_send_split (struct tgl_state *TLS, const char *message, tgl_p if (size > TGP_MAX_MSG_SIZE * TGP_DEFAULT_MAX_MSG_SPLIT_COUNT) { return -E2BIG; } + while (size > start) { int end = start + (int)TGP_MAX_MSG_SIZE; if (end > size) {