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

Commits:

1 changed file:

Changes:

  • gajim/groupchat_control.py
    ... ... @@ -1090,31 +1090,22 @@ class GroupchatControl(ChatControlBase):
    1090 1090
         def _nec_decrypted_message_received(self, obj):
    
    1091 1091
             if obj.conn.name != self.account:
    
    1092 1092
                 return
    
    1093
    -        if obj.gc_control == self and obj.resource:
    
    1093
    +
    
    1094
    +        if not obj.properties.jid.bareMatch(self.room_jid):
    
    1095
    +            return
    
    1096
    +
    
    1097
    +        if obj.properties.is_muc_pm and not obj.session.control:
    
    1094 1098
                 # We got a pm from this room
    
    1095 1099
                 nick = obj.resource
    
    1096
    -            if obj.session.control:
    
    1097
    -                # print if a control is open
    
    1098
    -                frm = ''
    
    1099
    -                if obj.properties.is_sent_carbon:
    
    1100
    -                    frm = 'out'
    
    1101
    -                obj.session.control.add_message(
    
    1102
    -                    obj.msgtxt,
    
    1103
    -                    frm,
    
    1104
    -                    tim=obj.properties.timestamp,
    
    1105
    -                    displaymarking=obj.displaymarking,
    
    1106
    -                    message_id=obj.properties.id,
    
    1107
    -                    correct_id=obj.correct_id)
    
    1108
    -            else:
    
    1109
    -                # otherwise pass it off to the control to be queued
    
    1110
    -                self.on_private_message(nick,
    
    1111
    -                                        obj.properties.is_sent_carbon,
    
    1112
    -                                        obj.msgtxt,
    
    1113
    -                                        obj.properties.timestamp,
    
    1114
    -                                        self.session,
    
    1115
    -                                        obj.additional_data,
    
    1116
    -                                        msg_log_id=obj.msg_log_id,
    
    1117
    -                                        displaymarking=obj.displaymarking)
    
    1100
    +            # otherwise pass it off to the control to be queued
    
    1101
    +            self.on_private_message(nick,
    
    1102
    +                                    obj.properties.is_sent_carbon,
    
    1103
    +                                    obj.msgtxt,
    
    1104
    +                                    obj.properties.timestamp,
    
    1105
    +                                    self.session,
    
    1106
    +                                    obj.additional_data,
    
    1107
    +                                    msg_log_id=obj.msg_log_id,
    
    1108
    +                                    displaymarking=obj.displaymarking)
    
    1118 1109
     
    
    1119 1110
         def _nec_ping(self, obj):
    
    1120 1111
             if self.contact.jid != obj.contact.room_jid: