Mercurial > pidgin.yaz
comparison src/protocols/msn/msn.c @ 10346:bbf738a0ce7b
[gaim-migrate @ 11560]
More more MSN bug fixes from Felipe Contreras, and I fixed up the
display of messages that failed to send so that it matches what you
tried to send and doesn't have kittens with html entities and such.
I added a GAIM_MESSAGE_RAW type in HEAD to make the display of such
messages even more accurate, but I don't think such a cosmetic change,
which would bump us to 1.2.0, is all that important for oldstatus.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 12 Dec 2004 17:37:36 +0000 |
parents | 2e01c503aa4f |
children | 3e4ecbdf8d0a |
comparison
equal
deleted
inserted
replaced
10345:2e01c503aa4f | 10346:bbf738a0ce7b |
---|---|
779 g_free(body_str); | 779 g_free(body_str); |
780 | 780 |
781 format = msn_message_get_attr(msg, "X-MMS-IM-Format"); | 781 format = msn_message_get_attr(msg, "X-MMS-IM-Format"); |
782 msn_parse_format(format, &pre, &post); | 782 msn_parse_format(format, &pre, &post); |
783 body_str = g_strdup_printf("%s%s%s", pre, body_enc, post); | 783 body_str = g_strdup_printf("%s%s%s", pre, body_enc, post); |
784 g_free(body_enc); | |
784 g_free(pre); | 785 g_free(pre); |
785 g_free(post); | 786 g_free(post); |
786 | 787 |
787 serv_got_typing_stopped(gc, who); | 788 serv_got_typing_stopped(gc, who); |
788 serv_got_im(gc, who, body_str, flags, time(NULL)); | 789 serv_got_im(gc, who, body_str, flags, time(NULL)); |
820 | 821 |
821 if (swboard == NULL) | 822 if (swboard == NULL) |
822 return 0; | 823 return 0; |
823 | 824 |
824 if (swboard->empty) | 825 if (swboard->empty) |
826 return 0; | |
827 | |
828 if (!g_queue_is_empty(swboard->im_queue)) | |
825 return 0; | 829 return 0; |
826 | 830 |
827 msg = msn_message_new(MSN_MSG_TYPING); | 831 msg = msn_message_new(MSN_MSG_TYPING); |
828 msn_message_set_content_type(msg, "text/x-msmsgscontrol"); | 832 msn_message_set_content_type(msg, "text/x-msmsgscontrol"); |
829 msn_message_set_flag(msg, 'U'); | 833 msn_message_set_flag(msg, 'U'); |
830 msn_message_set_attr(msg, "TypingUser", | 834 msn_message_set_attr(msg, "TypingUser", |
831 gaim_account_get_username(account)); | 835 gaim_account_get_username(account)); |
832 msn_message_set_bin_data(msg, "\r\n", 2); | 836 msn_message_set_bin_data(msg, "\r\n", 2); |
833 | 837 |
834 swboard = msn_session_get_swboard(session, who); | 838 msn_switchboard_send_msg(swboard, msg); |
835 | |
836 if (!g_queue_is_empty(swboard->im_queue) || swboard->empty) | |
837 { | |
838 msn_switchboard_queue_msg(swboard, msg); | |
839 } | |
840 else | |
841 { | |
842 msn_switchboard_send_msg(swboard, msg); | |
843 } | |
844 | 839 |
845 msn_message_destroy(msg); | 840 msn_message_destroy(msg); |
846 | 841 |
847 return MSN_TYPING_SEND_TIMEOUT; | 842 return MSN_TYPING_SEND_TIMEOUT; |
848 } | 843 } |