App-MatrixTool

 view release on metacpan or  search on metacpan

lib/App/MatrixTool/Command/client/list_rooms.pm  view on Meta::CPAN

membership of.

=cut

sub run
{
   my $self = shift;

   # the Matrix spec doesn't have a nice way to ask what rooms I'm a member
   # of. About the best we can do is a /sync request with a filter that asks
   # for just the m.room.create event in each room while throwing away all the
   # timeline, account_data and presence.
   # See also
   #   https://github.com/matrix-org/matrix-doc/issues/734

   $self->do_json( GET => "/_matrix/client/r0/sync",
      params => {
         filter =>
            '{"room":{' .
               '"timeline":{"limit":0},' .
               '"state":{"types":["m.room.create"]},' .



( run in 0.245 second using v1.01-cache-2.11-cpan-496ff517765 )