Philipp Hörist pushed to branch mainwindow at gajim / gajim

Commits:

1 changed file:

Changes:

  • gajim/gtk/chat_list.py
    ... ... @@ -149,9 +149,20 @@ def _on_message_received(self, event):
    149 149
                 return
    
    150 150
     
    
    151 151
             row = self._chats.get((event.account, event.jid))
    
    152
    -        row.add_unread()
    
    153 152
             row.set_last_message_text('Me', event.msgtxt)
    
    154 153
     
    
    154
    +        self._add_unread(row, event.properties)
    
    155
    +
    
    156
    +    @staticmethod
    
    157
    +    def _add_unread(row, properties):
    
    158
    +        if properties.is_carbon_message and properties.carbon.is_sent:
    
    159
    +            return
    
    160
    +
    
    161
    +        if properties.is_from_us():
    
    162
    +            return
    
    163
    +
    
    164
    +        row.add_unread()
    
    165
    +
    
    155 166
     
    
    156 167
     class ChatRow(Gtk.ListBoxRow):
    
    157 168
         def __init__(self, workspace_id, account, jid, type_):