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

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2021-01-24 22:55:08 +0300
committerGitHub <noreply@github.com>2021-01-24 22:55:08 +0300
commit15e7cbc3441445bc0bd76143154fc51724c13747 (patch)
tree4a349f293f7c00b008f6af19d14a9a42d65bdbdd
parent59743bec463f50da92a5742c10c830a8705ffac3 (diff)
parent130ab8ffac2606180cf4ebf62dde46a953fbf765 (diff)
Merge pull request #671 from jpalus/master
Switch BitlBee image message from system to normal IM/Chat
-rw-r--r--skypeweb/skypeweb_contacts.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/skypeweb/skypeweb_contacts.c b/skypeweb/skypeweb_contacts.c
index f1f1671..35dddc9 100644
--- a/skypeweb/skypeweb_contacts.c
+++ b/skypeweb/skypeweb_contacts.c
@@ -26,14 +26,6 @@
#include "xfer.h"
#include "image-store.h"
-static void purple_conversation_write_system_message_ts(
- PurpleConversation *conv, const gchar *msg, PurpleMessageFlags flags,
- time_t ts) {
- PurpleMessage *pmsg = purple_message_new_system(msg, flags);
- purple_message_set_time(pmsg, ts);
- purple_conversation_write_message(conv, pmsg);
- purple_message_destroy(pmsg);
-}
static void purple_conversation_write_img_message(
PurpleConversation *conv, const char* who, const gchar *msg,
PurpleMessageFlags flags, time_t ts) {
@@ -198,7 +190,12 @@ skypeweb_download_uri_to_conv(SkypeWebAccount *sa, const gchar *uri, PurpleConve
// Bitlbee doesn't support images, so just plop a url to the image instead
url = purple_strreplace(uri, "imgt1", "imgpsh_fullsize");
- purple_conversation_write_system_message_ts(conv, url, PURPLE_MESSAGE_SYSTEM, ts);
+ if (PURPLE_IS_IM_CONVERSATION(conv)) {
+ purple_serv_got_im(sa->pc, from, url, PURPLE_MESSAGE_RECV, ts);
+ } else if (PURPLE_IS_CHAT_CONVERSATION(conv)) {
+ gchar *chatname = purple_conversation_get_data(conv, "chatname");
+ purple_serv_got_chat_in(sa->pc, g_str_hash(chatname), from, PURPLE_MESSAGE_RECV, url, ts);
+ }
g_free(url);
return;