NULL);
}
+EmpathyContact *
+empathy_contact_new_static (McAccount *account,
+ const gchar *id,
+ const gchar *name,
+ gboolean is_user)
+{
+ g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
+ g_return_val_if_fail (id != NULL, NULL);
+
+ return g_object_new (EMPATHY_TYPE_CONTACT,
+ "account", account,
+ "id", id,
+ "name", name,
+ "is-user", is_user,
+ NULL);
+}
+
TpContact *
empathy_contact_get_tp_contact (EmpathyContact *contact)
{
GType empathy_contact_get_type (void) G_GNUC_CONST;
EmpathyContact * empathy_contact_new (TpContact *tp_contact);
+EmpathyContact * empathy_contact_new_static (McAccount *account,
+ const gchar *id, const gchar *name, gboolean is_user);
TpContact * empathy_contact_get_tp_contact (EmpathyContact *contact);
const gchar * empathy_contact_get_id (EmpathyContact *contact);
void empathy_contact_set_id (EmpathyContact *contact, const gchar *id);
t = empathy_time_parse (time);
- sender = g_object_new (EMPATHY_TYPE_CONTACT,
- "account", account,
- "id", sender_id,
- "name", sender_name,
- "is-user", is_user,
- NULL);
+ sender = empathy_contact_new_static (account, sender_id, sender_name,
+ is_user);
+
if (!EMP_STR_EMPTY (sender_avatar_token))
empathy_contact_load_avatar_cache (sender,
sender_avatar_token);