#include <gtk/gtk.h>
#include <telepathy-glib/util.h>
-#include <libmissioncontrol/mc-account.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-account.h>
#include "empathy-chat-text-view.h"
#include "empathy-chat.h"
priv = GET_PRIV (view);
priv->last_timestamp = 0;
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ priv->last_contact = NULL;
+ }
}
static gboolean
EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (view);
EmpathyThemeAdiumPriv *priv = GET_PRIV (theme);
EmpathyContact *sender;
- McAccount *account;
+ EmpathyAccount *account;
McProfile *account_profile;
gchar *dup_body = NULL;
const gchar *body;
/* Get information */
sender = empathy_message_get_sender (msg);
account = empathy_contact_get_account (sender);
- account_profile = mc_account_get_profile (account);
+ account_profile = empathy_account_get_profile (account);
service_name = mc_profile_get_display_name (account_profile);
timestamp = empathy_message_get_timestamp (msg);
body = empathy_message_get_body (msg);
priv->data->template_html,
basedir_uri);
g_free (basedir_uri);
+
+ /* Clear last contact to avoid trying to add a 'joined'
+ * message when we don't have an insertion point. */
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ priv->last_contact = NULL;
+ }
}
static gboolean