diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-18 21:19:11 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-18 21:19:11 +0800 |
commit | 35cde642055edd0334283ad63224608e0f388fdb (patch) | |
tree | 6e58e321331696da7531a50535c0c9852731c310 | |
parent | 12edcf477eaf0bd6a2c9307e2d82a0c1383646d8 (diff) | |
download | gsoc2013-empathy-35cde642055edd0334283ad63224608e0f388fdb.tar gsoc2013-empathy-35cde642055edd0334283ad63224608e0f388fdb.tar.gz gsoc2013-empathy-35cde642055edd0334283ad63224608e0f388fdb.tar.bz2 gsoc2013-empathy-35cde642055edd0334283ad63224608e0f388fdb.tar.lz gsoc2013-empathy-35cde642055edd0334283ad63224608e0f388fdb.tar.xz gsoc2013-empathy-35cde642055edd0334283ad63224608e0f388fdb.tar.zst gsoc2013-empathy-35cde642055edd0334283ad63224608e0f388fdb.zip |
display_invite_room_dialog: deal with contact being NULL
-rw-r--r-- | 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 3139c503e..5f2fdfae1 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, |