[polari/wip/fmuellner/log-highlighting: 4/6] room: Use nick matching to filter out mentions from self
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/log-highlighting: 4/6] room: Use nick matching to filter out mentions from self
- Date: Sat, 9 Jul 2016 02:17:21 +0000 (UTC)
commit 139869c419ead831c6e21b146e5875e4ce1ba75f
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jul 9 02:16:33 2016 +0200
room: Use nick matching to filter out mentions from self
src/lib/polari-room.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/lib/polari-room.c b/src/lib/polari-room.c
index 7e05737..46c9c27 100644
--- a/src/lib/polari-room.c
+++ b/src/lib/polari-room.c
@@ -165,8 +165,7 @@ polari_room_should_highlight_message (PolariRoom *room,
TpMessage *message)
{
PolariRoomPrivate *priv;
- TpConnection *conn;
- TpContact *self;
+ TpContact *sender;
char *text;
gboolean result = FALSE;
@@ -174,15 +173,11 @@ polari_room_should_highlight_message (PolariRoom *room,
priv = room->priv;
- if (!priv->channel)
- return FALSE;
if (priv->type != TP_HANDLE_TYPE_ROOM)
return FALSE;
- conn = tp_channel_get_connection (room->priv->channel);
- self = tp_connection_get_self_contact (conn);
-
- if (tp_signalled_message_get_sender (message) == self)
+ sender = tp_signalled_message_get_sender (message);
+ if (match_self_nick (room, tp_contact_get_alias (sender)))
return FALSE;
text = tp_message_to_text (message, NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]