# File jabber4r/session.rb, line 533

    def request_roster

      if @authenticated

        msg_id = id

        @connection.send(Jabber::Protocol::Iq.gen_roster(self, msg_id)) do |element|

          if element.attr_id == msg_id

            element.consume_element

            element.query.item.count.times do |i|

              item = element.query.item[i]

              @roster.add(item.attr_jid, item.attr_subscription, item.attr_name, item.group.element_data)

            end

          end

        end

        Thread.stop

        register_roster_filter

      end

    end