summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <resiak@soc.pidgin.im>2007-08-06 00:57:07 +0000
committerWill Thompson <resiak@soc.pidgin.im>2007-08-06 00:57:07 +0000
commit9c309ba043329b5e98b51ec707533417a402781e (patch)
tree6d0b732237e725a0e8b9bb6c4ec5a7f468788180
parent50279f0ecba872bb443b2fbbb2c15263ebfce2b0 (diff)
Rearrange haze_write_im slightly for legibility.
-rw-r--r--src/im-channel-factory.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/im-channel-factory.c b/src/im-channel-factory.c
index b797491..d2cd690 100644
--- a/src/im-channel-factory.c
+++ b/src/im-channel-factory.c
@@ -382,23 +382,19 @@ haze_write_im (PurpleConversation *conv,
g_assert (who);
handle = tp_handle_ensure (contact_repo, who, NULL, NULL);
- if (handle == 0) {
+ if (handle == 0)
+ {
g_debug ("got a 0 handle, ignoring message");
return;
}
-
- message = purple_markup_strip_html (xhtml_message);
-
chan = get_im_channel (self, handle, NULL);
+ tp_handle_unref (contact_repo, handle);
- tp_handle_unref (contact_repo, handle); /* reffed by chan */
-
- if (flags & PURPLE_MESSAGE_AUTO_RESP) {
+ message = purple_markup_strip_html (xhtml_message);
+ if (flags & PURPLE_MESSAGE_AUTO_RESP)
type = TP_CHANNEL_TEXT_MESSAGE_TYPE_AUTO_REPLY;
- }
- else if (purple_message_meify(message, -1)) {
+ else if (purple_message_meify(message, -1))
type = TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION;
- }
tp_text_mixin_receive (G_OBJECT (chan), type, handle,
mtime, message);