mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Update get_users to use the refactored User type
This commit is contained in:
parent
6bc2db7157
commit
1873344467
@ -16,8 +16,9 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import pyrogram
|
||||||
from pyrogram.api import functions
|
from pyrogram.api import functions
|
||||||
from ...ext import BaseClient, utils
|
from ...ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
class GetUsers(BaseClient):
|
class GetUsers(BaseClient):
|
||||||
@ -52,6 +53,6 @@ class GetUsers(BaseClient):
|
|||||||
users = []
|
users = []
|
||||||
|
|
||||||
for i in r:
|
for i in r:
|
||||||
users.append(utils.parse_user(i))
|
users.append(pyrogram.User.parse(self, i))
|
||||||
|
|
||||||
return users if is_iterable else users[0]
|
return users if is_iterable else users[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user