diff --git a/README.md b/README.md index df510c0..13ea3d9 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Telegram-purple is a Libpurple plugin that adds support for the Telegram messeng Build ----- -Below, you will find instructions of how to build the libpurple protocol plugin. If you just want to use the plugin in Adium, [download precompiled packages here.](https://github.com/majn/telegram-purple/releases) +Below, you will find instructions on how to build the libpurple protocol plugin. If you just want to use the plugin in Adium, [download precompiled packages here.](https://github.com/majn/telegram-purple/releases) #### 1. Clone @@ -14,6 +14,7 @@ This repository has submodules, so you need to clone recursively git clone --recursive https://github.com/majn/telegram-purple + cd telegram-purple #### 2. Fetch all dependencies @@ -40,6 +41,16 @@ This repository has submodules, so you need to clone recursively sudo make install +Pulling Updates +--------------- + +This repository contains submodules and just a simple pull won't be enough to update all submodule files. Pull new changes with: + + + git pull + git submodule update --recursive + + Usage ----- diff --git a/msglog.c b/msglog.c index 87f8cbc..b67ea28 100644 --- a/msglog.c +++ b/msglog.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #include #include diff --git a/msglog.h b/msglog.h index bb9f256..7e728b4 100644 --- a/msglog.h +++ b/msglog.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #include diff --git a/telegram-adium/AdiumTelegramAccount.h b/telegram-adium/AdiumTelegramAccount.h index 3ccde70..52e54ee 100644 --- a/telegram-adium/AdiumTelegramAccount.h +++ b/telegram-adium/AdiumTelegramAccount.h @@ -12,6 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + * Copyright Matthias Jentsch 2014-2015 */ #import diff --git a/telegram-adium/AdiumTelegramAccount.m b/telegram-adium/AdiumTelegramAccount.m index fdd2bca..1e87958 100644 --- a/telegram-adium/AdiumTelegramAccount.m +++ b/telegram-adium/AdiumTelegramAccount.m @@ -12,6 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + * Copyright Matthias Jentsch 2014-2015 */ #import "AdiumTelegramAccount.h" diff --git a/telegram-adium/TelegramPlugin.h b/telegram-adium/TelegramPlugin.h index cce5641..7e6dce7 100644 --- a/telegram-adium/TelegramPlugin.h +++ b/telegram-adium/TelegramPlugin.h @@ -12,6 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + * Copyright Matthias Jentsch 2014-2015 */ #import diff --git a/telegram-adium/TelegramPlugin.m b/telegram-adium/TelegramPlugin.m index 3bdfb0f..e420bde 100644 --- a/telegram-adium/TelegramPlugin.m +++ b/telegram-adium/TelegramPlugin.m @@ -12,6 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + * Copyright Matthias Jentsch 2014-2015 */ #ifdef HAVE_CONFIG_H diff --git a/telegram-adium/TelegramService.h b/telegram-adium/TelegramService.h index 2071314..7144cfb 100644 --- a/telegram-adium/TelegramService.h +++ b/telegram-adium/TelegramService.h @@ -12,6 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + * Copyright Matthias Jentsch 2014-2015 */ #import diff --git a/telegram-adium/TelegramService.m b/telegram-adium/TelegramService.m index 2ba4d15..1faa49e 100644 --- a/telegram-adium/TelegramService.m +++ b/telegram-adium/TelegramService.m @@ -12,6 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + * Copyright Matthias Jentsch 2014-2015 */ #import "TelegramService.h" diff --git a/telegram-base.c b/telegram-base.c index 4ea9856..c8b0466 100644 --- a/telegram-base.c +++ b/telegram-base.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014 + Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015 */ #define _GNU_SOURCE #include diff --git a/telegram-base.h b/telegram-base.h index 3a89e4f..b805abd 100644 --- a/telegram-base.h +++ b/telegram-base.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014 + Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015 */ #ifndef __TELEGRAM_BASE_H__ #define __TELEGRAM_BASE_H__ diff --git a/telegram-purple.c b/telegram-purple.c index b860bfb..7dada61 100755 --- a/telegram-purple.c +++ b/telegram-purple.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014 + Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015 */ #ifdef HAVE_CONFIG_H @@ -539,8 +539,7 @@ static int tgprpl_send_im (PurpleConnection * gc, const char *who, const char *m */ tgl_peer_t *peer = find_peer_by_name (conn->TLS, who); if (peer) { - - if (tgl_get_peer_type(peer->id) == TGL_PEER_ENCR_CHAT && peer->encr_chat.state != sc_ok) { + if (tgl_get_peer_type (peer->id) == TGL_PEER_ENCR_CHAT && peer->encr_chat.state != sc_ok) { warning ("secret chat not ready for sending messages or deleted"); return -1; } @@ -838,8 +837,7 @@ static void tgprpl_init (PurplePlugin *plugin) { _telegram_protocol = plugin; } -static GList *tgprpl_actions(PurplePlugin * plugin, gpointer context) { - // return possible actions (See Libpurple doc) +static GList *tgprpl_actions (PurplePlugin * plugin, gpointer context) { return (GList *)NULL; } diff --git a/telegram-purple.h b/telegram-purple.h index c3acbf7..06ca9e9 100644 --- a/telegram-purple.h +++ b/telegram-purple.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014 + Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015 */ #ifndef __TG_PURPLE_H__ #define __TG_PURPLE_H__ diff --git a/tgp-2prpl.c b/tgp-2prpl.c index 3ba19a7..ed83404 100644 --- a/tgp-2prpl.c +++ b/tgp-2prpl.c @@ -98,7 +98,8 @@ void p2tgl_got_chat_left (struct tgl_state *TLS, tgl_peer_id_t chat) { serv_got_chat_left(tg_get_conn(TLS), tgl_get_peer_id(chat)); } -void p2tgl_got_chat_in (struct tgl_state *TLS, tgl_peer_id_t chat, tgl_peer_id_t who, const char *message, int flags, time_t when) { +void p2tgl_got_chat_in (struct tgl_state *TLS, tgl_peer_id_t chat, tgl_peer_id_t who, + const char *message, int flags, time_t when) { char *name = p2tgl_peer_strdup_id (who); serv_got_chat_in (tg_get_conn(TLS), tgl_get_peer_id (chat), name, flags, message, when); diff --git a/tgp-2prpl.h b/tgp-2prpl.h index d503d70..a93e5c6 100644 --- a/tgp-2prpl.h +++ b/tgp-2prpl.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #ifndef __telegram_adium__purple2tgl__ #define __telegram_adium__purple2tgl__ diff --git a/tgp-chat.c b/tgp-chat.c index 46ceeb1..41c36d9 100644 --- a/tgp-chat.c +++ b/tgp-chat.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #include "tgp-chat.h" diff --git a/tgp-chat.h b/tgp-chat.h index d4de13b..cf418f0 100644 --- a/tgp-chat.h +++ b/tgp-chat.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #ifndef __telegram_adium__tgp_chat__ diff --git a/tgp-ft.c b/tgp-ft.c index c21eaa4..8b91cb5 100644 --- a/tgp-ft.c +++ b/tgp-ft.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #include "tgp-utils.h" @@ -100,7 +100,7 @@ static gboolean tgprpl_xfer_upload_progress (gpointer _data) { purple_xfer_set_bytes_sent (X, conn->TLS->cur_downloaded_bytes); purple_xfer_update_progress (X); - debug ("PURPLE_XFER_RECEIVER progress %d / %d", conn->TLS->cur_downloaded_bytes, conn->TLS->cur_downloading_bytes); + debug ("PURPLE_XFER_RECEIVE progress %d / %d", conn->TLS->cur_downloaded_bytes, conn->TLS->cur_downloading_bytes); if (conn->TLS->cur_downloading_bytes == conn->TLS->cur_downloaded_bytes) { data->timer = 0; return FALSE; diff --git a/tgp-ft.h b/tgp-ft.h index e12a95e..09e336c 100644 --- a/tgp-ft.h +++ b/tgp-ft.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #ifndef __telegram_adium__tgp_ft__ diff --git a/tgp-msg.c b/tgp-msg.c index 35a0e0d..5150892 100644 --- a/tgp-msg.c +++ b/tgp-msg.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #include @@ -379,7 +379,6 @@ void tgp_msg_recv (struct tgl_state *TLS, struct tgl_message *M) } if (M->media.type == tgl_message_media_geo) { - C->done = FALSE; } if (M->media.type == tgl_message_media_photo_encr) { diff --git a/tgp-msg.h b/tgp-msg.h index c084923..e671aad 100644 --- a/tgp-msg.h +++ b/tgp-msg.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #ifndef __telegram_adium__tgp_msg__ diff --git a/tgp-net.c b/tgp-net.c index 2708ff5..bd03e26 100644 --- a/tgp-net.c +++ b/tgp-net.c @@ -15,7 +15,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Copyright Vitaly Valtman 2013-2014 + Copyright Vitaly Valtman 2013-2015 */ #ifdef HAVE_CONFIG_H diff --git a/tgp-structs.c b/tgp-structs.c index 8b46402..382a9cd 100644 --- a/tgp-structs.c +++ b/tgp-structs.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #include "tgp-structs.h" diff --git a/tgp-structs.h b/tgp-structs.h index 2942064..15c3330 100755 --- a/tgp-structs.h +++ b/tgp-structs.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #ifndef __telegram_adium__tgp_data__ diff --git a/tgp-timers.c b/tgp-timers.c index 16c8cfb..70c1548 100644 --- a/tgp-timers.c +++ b/tgp-timers.c @@ -15,7 +15,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Copyright Vitaly Valtman 2013-2014 + Copyright Vitaly Valtman 2013-2015 */ #include #include diff --git a/tgp-utils.c b/tgp-utils.c index e57eb32..6687e75 100644 --- a/tgp-utils.c +++ b/tgp-utils.c @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #include "tgp-utils.h" diff --git a/tgp-utils.h b/tgp-utils.h index a44170f..9ce7d9a 100644 --- a/tgp-utils.h +++ b/tgp-utils.h @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - Copyright Matthias Jentsch 2014 + Copyright Matthias Jentsch 2014-2015 */ #ifndef __telegram_adium__tgp_util__ #define __telegram_adium__tgp_util__