| 111 displayed = purple_markup_linkify(message); |
112 displayed = purple_markup_linkify(message); |
| 112 } |
113 } |
| 113 |
114 |
| 114 if (displayed && (priv->features & PURPLE_CONNECTION_FLAG_HTML) && |
115 if (displayed && (priv->features & PURPLE_CONNECTION_FLAG_HTML) && |
| 115 !(msgflags & PURPLE_MESSAGE_RAW)) { |
116 !(msgflags & PURPLE_MESSAGE_RAW)) { |
| 116 sent = g_strdup(displayed); |
117 sent = displayed; |
| 117 } else |
118 } else |
| 118 sent = g_strdup(message); |
119 sent = message; |
| 119 |
120 |
| 120 msgflags |= PURPLE_MESSAGE_SEND; |
121 msgflags |= PURPLE_MESSAGE_SEND; |
| 121 |
122 |
| 122 if (PURPLE_IS_IM_CONVERSATION(conv)) { |
123 if (PURPLE_IS_IM_CONVERSATION(conv)) { |
| 123 msg = purple_message_new_outgoing( |
124 msg = purple_message_new_outgoing( |
| 128 |
129 |
| 129 if (!purple_message_is_empty(msg)) { |
130 if (!purple_message_is_empty(msg)) { |
| 130 |
131 |
| 131 err = purple_serv_send_im(gc, msg); |
132 err = purple_serv_send_im(gc, msg); |
| 132 |
133 |
| 133 if ((err > 0) && (displayed != NULL)) |
134 if ((err > 0) && (displayed != NULL)) { |
| |
135 /* revert the contents in case sending-im-msg changed it */ |
| |
136 purple_message_set_contents(msg, displayed); |
| 134 purple_conversation_write_message(conv, msg); |
137 purple_conversation_write_message(conv, msg); |
| |
138 } |
| 135 |
139 |
| 136 purple_signal_emit(purple_conversations_get_handle(), |
140 purple_signal_emit(purple_conversations_get_handle(), |
| 137 "sent-im-msg", account, msg); |
141 "sent-im-msg", account, msg); |
| 138 } |
142 } |
| 139 } |
143 } |