telegram-purple/telegram-purple.h
mjentsch c3f48b9835 Don't automatically add all chats to the buddy list
This should fix issue where left chats show up in the blist and cannot be removed anymore and broken Adium bookmarks.
This patch should make the whole chat handling much more native to libpurple, in which chats are added through the chatlist,
the join-chat window or automatically when incoming messages are received. Add a new option "Add chats to buddy list" in
case anyone wants the old behavior.
2015-09-12 22:21:27 +02:00

73 lines
2.6 KiB
C

/*
This file is part of telegram-purple
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
*/
#ifndef __TG_PURPLE_H__
#define __TG_PURPLE_H__
#include <tgl.h>
#define PLUGIN_ID "prpl-telegram"
#define TG_AUTHOR "Matthias Jentsch <mtthsjntsch@gmail.com>, Vitaly Valtman, Christopher Althaus <althaus.christopher@gmail.com>, Markus Endres <endresma45241@th-nuernberg.de>. Based on libtgl by Vitaly Valtman."
#define TG_DESCRIPTION "Telegram protocol."
#define TG_BUILD "12"
#include <notify.h>
#include <plugin.h>
#include <version.h>
#include <account.h>
#include <connection.h>
#define TGP_APP_HASH "99428c722d0ed59b9cd844e4577cb4bb"
#define TGP_APP_ID 16154
#define TGP_MAX_MSG_SIZE 4096
#define TGP_DEFAULT_MAX_MSG_SPLIT_COUNT 4
#define TGP_KEY_PASSWORD_TWO_FACTOR "password-two-factor"
#define TGP_DEFAULT_ACCEPT_SECRET_CHATS "ask"
#define TGP_KEY_ACCEPT_SECRET_CHATS "accept-secret-chats"
#define TGP_DEFAULT_INACTIVE_DAYS_OFFLINE 7
#define TGP_KEY_INACTIVE_DAYS_OFFLINE "inactive-days-offline"
#define TGP_DEFAULT_HISTORY_RETRIEVAL_THRESHOLD 14
#define TGP_KEY_HISTORY_RETRIEVAL_THRESHOLD "history-retrieve-days"
#define TGP_DEFAULT_JOIN_GROUP_CHATS FALSE
#define TGP_KEY_JOIN_GROUP_CHATS "auto-join-group-chats"
#define TGP_KEY_HISTORY_SYNC_ALL "history-sync-all"
#define TGP_DEFAULT_HISTORY_SYNC_ALL FALSE
#define TGP_DEFAULT_DISPLAY_READ_NOTIFICATIONS FALSE
#define TGP_KEY_DISPLAY_READ_NOTIFICATIONS "display-read-notifications"
#define TGP_DEFAULT_SEND_READ_NOTIFICATIONS TRUE
#define TGP_KEY_SEND_READ_NOTIFICATIONS "send-read-notifications"
void on_ready (struct tgl_state *TLS);
extern const char *pk_path;
extern const char *config_dir;
extern PurplePlugin *_telegram_protocol;
void export_chat_link_checked (struct tgl_state *TLS, const char *name);
void import_chat_link_checked (struct tgl_state *TLS, const char *link);
void leave_and_delete_chat (PurpleBlistNode *node, gpointer data);
#endif