switch (priv->handle_type) {
case TP_HANDLE_TYPE_CONTACT:
empathy_dispatcher_chat_with_contact_id (
- connection, priv->id,
+ connection, priv->id, EMPATHY_DISPATCHER_NON_USER_ACTION,
chat_connect_channel_reconnected,
chat);
break;
data->message = g_strdup (message);
connection = empathy_tp_chat_get_connection (priv->tp_chat);
empathy_dispatcher_chat_with_contact_id (connection, contact_id,
+ gtk_get_current_event_time (),
chat_command_msg_cb,
data);
}
if (contact) {
DEBUG ("Starting a chat");
- empathy_dispatcher_chat_with_contact (contact, NULL, NULL);
+ empathy_dispatcher_chat_with_contact (contact,
+ gtk_get_current_event_time (), NULL, NULL);
g_object_unref (contact);
}
}
empathy_contact_chat_menu_item_activated (GtkMenuItem *item,
EmpathyContact *contact)
{
- empathy_dispatcher_chat_with_contact (contact, NULL, NULL);
+ empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time (),
+ NULL, NULL);
}
GtkWidget *
if (EMP_STR_EMPTY (contact_id) || connection == NULL) goto out;
- empathy_dispatcher_chat_with_contact_id (connection, contact_id, NULL, NULL);
+ empathy_dispatcher_chat_with_contact_id (connection, contact_id,
+ gtk_get_current_event_time (), NULL, NULL);
out:
gtk_widget_destroy (GTK_WIDGET (dialog));
void
empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
+ gint64 timestamp,
EmpathyDispatcherRequestCb *callback,
gpointer user_data)
{
/* The contact handle might not be known yet */
request_data = new_dispatcher_request_data (self, connection,
TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_CONTACT,
- empathy_contact_get_handle (contact), NULL,
- EMPATHY_DISPATCHER_NON_USER_ACTION, contact,
+ empathy_contact_get_handle (contact), NULL, timestamp, contact,
callback, user_data);
request_data->should_ensure = TRUE;
EmpathyDispatcher *dispatcher;
EmpathyDispatcherRequestCb *callback;
gpointer user_data;
+ gint64 timestamp;
} ChatWithContactIdData;
static void
}
else
{
- empathy_dispatcher_chat_with_contact (contact, data->callback,
- data->user_data);
+ empathy_dispatcher_chat_with_contact (contact, data->timestamp,
+ data->callback, data->user_data);
}
g_object_unref (data->dispatcher);
void
empathy_dispatcher_chat_with_contact_id (TpConnection *connection,
const gchar *contact_id,
+ gint64 timestamp,
EmpathyDispatcherRequestCb *callback,
gpointer user_data)
{
data->dispatcher = self;
data->callback = callback;
data->user_data = user_data;
+ data->timestamp = timestamp;
empathy_tp_contact_factory_get_from_id (factory, contact_id,
dispatcher_chat_with_contact_id_cb, data, NULL, NULL);
/* Requesting 1 to 1 text channels */
void empathy_dispatcher_chat_with_contact_id (TpConnection *connection,
- const gchar *contact_id, EmpathyDispatcherRequestCb *callback,
+ const gchar *contact_id,
+ gint64 timestamp,
+ EmpathyDispatcherRequestCb *callback,
gpointer user_data);
void empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
- EmpathyDispatcherRequestCb *callback, gpointer user_data);
+ gint64 timestamp,
+ EmpathyDispatcherRequestCb *callback,
+ gpointer user_data);
/* Request a file channel to a specific contact */
void empathy_dispatcher_send_file_to_contact (EmpathyContact *contact,
empathy_dispatcher_join_muc (connection, data->id, NULL, NULL);
else
empathy_dispatcher_chat_with_contact_id (connection, data->id,
- NULL, NULL);
+ EMPATHY_DISPATCHER_NON_USER_ACTION, NULL, NULL);
g_signal_emit (self, signals[CHATS_CHANGED], 0,
g_queue_get_length (priv->queue));
if (connection) {
empathy_dispatcher_chat_with_contact_id (
- connection, contact_id, NULL, NULL);
+ connection, contact_id, gtk_get_current_event_time (), NULL, NULL);
}
g_strfreev (strv);
if (!contact)
return;
- empathy_dispatcher_chat_with_contact (contact, chat_cb, NULL);
+ empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time (),
+ chat_cb, NULL);
g_object_unref (contact);
}