Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/telegram-purple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormjentsch <mtthsjntsch@gmail.com>2015-01-28 20:41:41 +0300
committermjentsch <mtthsjntsch@gmail.com>2015-01-28 20:41:41 +0300
commitc85b8da619866bbeadc19aa98bf0d6f30889d6da (patch)
tree51bb744336d986e0aa251e80ffc4651c90a53abc /tgp-chat.h
parent2ec44834fc812b80dce9a0e08b49b7b75d436e92 (diff)
Do not add group chats in which the user is not a member
Clean up and refactor group chat code, move chat functions into separate file, always load all chat infos on plugin load so we know the members.
Diffstat (limited to 'tgp-chat.h')
-rw-r--r--tgp-chat.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/tgp-chat.h b/tgp-chat.h
new file mode 100644
index 0000000..d4de13b
--- /dev/null
+++ b/tgp-chat.h
@@ -0,0 +1,34 @@
+/*
+ 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 2014
+ */
+
+#ifndef __telegram_adium__tgp_chat__
+#define __telegram_adium__tgp_chat__
+
+#include "telegram-purple.h"
+#include "tgp-structs.h"
+#include "tgp-2prpl.h"
+#include <purple.h>
+
+PurpleConversation *chat_show (PurpleConnection *gc, int id);
+void chat_users_update (struct tgl_state *TLS, struct tgl_chat *chat);
+int chat_add_message (struct tgl_state *TLS, struct tgl_message *M, char *text);
+int chat_is_member (int who, struct tgl_chat *chat);
+
+#endif