[polari] chatroomManager: Use contact alias as channel name if available
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatroomManager: Use contact alias as channel name if available
- Date: Thu, 1 Oct 2015 21:26:15 +0000 (UTC)
commit 8b4dec521f3564da82c5112b0c1dbe501ebe3a9b
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Oct 1 16:51:59 2015 +0200
chatroomManager: Use contact alias as channel name if available
We use TpContact:alias to represent other users in the user list
and elsewhere, so for private conversations it makes for a better
channel name than the channel identifier in case the two differ
(which may happen as the latter is always lowercase).
https://bugzilla.gnome.org/show_bug.cgi?id=755722
src/chatroomManager.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index 0458a1e..7a7b08e 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -209,7 +209,9 @@ const _ChatroomManager = new Lang.Class({
_ensureRoomForChannel: function(channel) {
let account = channel.connection.get_account();
- let channelName = channel.identifier;
+ let targetContact = channel.target_contact;
+ let channelName = targetContact ? targetContact.alias
+ : channel.identifier;
let room = this._ensureRoom(account, channelName, channel.handle_type);
room.channel = channel;
return room;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]