[empathy] display_invite_room_dialog: deal with contact being NULL
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] display_invite_room_dialog: deal with contact being NULL
- Date: Wed, 18 Aug 2010 14:09:34 +0000 (UTC)
commit 35cde642055edd0334283ad63224608e0f388fdb
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Aug 18 15:19:11 2010 +0200
display_invite_room_dialog: deal with contact being NULL
src/empathy-event-manager.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 3139c50..5f2fdfa 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -738,9 +738,17 @@ display_invite_room_dialog (EventManagerApproval *approval)
tp_channel_group_get_local_pending_info (approval->main_channel, self_handle,
NULL, NULL, &invite_msg);
- msg = g_strdup_printf (_("%s invited you to join %s"),
- empathy_contact_get_alias (approval->contact),
- tp_channel_get_identifier (approval->main_channel));
+ if (approval->contact != NULL)
+ {
+ msg = g_strdup_printf (_("%s invited you to join %s"),
+ empathy_contact_get_alias (approval->contact),
+ tp_channel_get_identifier (approval->main_channel));
+ }
+ else
+ {
+ msg = g_strdup_printf (_("You have been invited to join %s"),
+ tp_channel_get_identifier (approval->main_channel));
+ }
event_manager_add (approval->manager, approval->contact,
EMPATHY_EVENT_TYPE_INVITATION, EMPATHY_IMAGE_GROUP_MESSAGE, msg,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]