raiden-network / raiden-libs

Useful tools for Raiden and Auxiliary services
2 stars 12 forks source link

limit argument is not being used in MatrixTransport.get_room_events #131

Closed schmir closed 5 years ago

schmir commented 5 years ago

The method currently looks like:

    def get_room_events(self, limit=100):
        """Get past messages in the broadcast room, up to the @limit"""
        f = {"room": {"timeline": {"limit": 100}}}
        result = self.client.api.sync(filter=json.dumps(f))
        room_id = self.room.room_id
        room = result['rooms']['join'][room_id]
        return room['timeline']['events']

i.e. the argument limit is being ignored. It looks like it should end up in the f variable. Something like sync_filter would also be a more descriptive name than f.