def completion_ping(self, the_input): l = [contact.bare_jid for contact in roster.get_contacts()] return the_input.auto_completion(l, '', quotify=False)
def completion_muc_ping(self, the_input): users = [user.nick for user in self.api.current_tab().users] l = [contact.bare_jid for contact in roster.get_contacts()] users.extend(l) return the_input.auto_completion(users, '', quotify=False)
def resources(self): l = [] for contact in roster.get_contacts(): for resource in contact.resources: l.append(resource.jid) return l