(cls, domain, user_id, contact_id)
Returns the SQLLastReadMessage representing the last chat message
        that was read in the given domain by the given user_id for the given
        contact_id.
Returns the SQLLastReadMessage representing the last chat message
        that was read in the given domain by the given user_id for the given
        contact_id.
Returns the SQLLastReadMessage representing the last chat message that was read in the given domain by the given user_id for the given contact_id .
def by_user(cls, domain, user_id, contact_id):
        """
        Returns the SQLLastReadMessage representing the last chat message
        that was read in the given domain by the given user_id for the given
        contact_id.
        """
        try:
            # It's not expected that this can raise MultipleObjectsReturned
            # since we lock out creation of these records with a CriticalSection.
            # So if that happens, let the exception raise.
            return cls.objects.get(
                domain=domain,
                read_by=user_id,
                contact_id=contact_id
            )
        except cls.DoesNotExist:
            return None
def by_user ( cls , domain , user_id , contact_id ) : try : # It's not expected that this can raise MultipleObjectsReturned # since we lock out creation of these records with a CriticalSection. # So if that happens, let the exception raise. return cls . objects . get ( domain = domain , read_by = user_id , contact_id = contact_id ) except cls . DoesNotExist : return None