Skip to content

Commit

Permalink
fix the rest of user_list missing admin arg
Browse files Browse the repository at this point in the history
fixes #127
  • Loading branch information
JacksonChen666 committed Sep 14, 2023
1 parent 0d2a1f7 commit 66c5bfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions synadm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def user_list_paginate(self, _limit, _guests, _deactivated,
"""
while _from is not None:
response = self.user_list(_from, _limit, _guests, _deactivated,
_name, _user_id)
_name, _user_id, None)
yield response
_from = response.get("next_token", None)

Expand Down Expand Up @@ -1345,7 +1345,7 @@ def notice_send(self, receivers, content_plain, content_html, paginate,
# A regular expression was supplied to match receivers.
if regex:
outputs = []
response = self.user_list(0, paginate, True, False, "", "")
response = self.user_list(0, paginate, True, False, "", "", None)
if "users" not in response:
return
while True:
Expand All @@ -1361,7 +1361,7 @@ def notice_send(self, receivers, content_plain, content_html, paginate,
if "next_token" not in response:
return outputs
response = self.user_list(response["next_token"],
100, True, False, "", "")
100, True, False, "", "", None)
# Only a single user ID was supplied as receiver
else:
data["user_id"] = receivers
Expand Down
3 changes: 2 additions & 1 deletion synadm/cli/notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def confirm_prompt():
formatted_content = formatted if formatted else plain_content

if regex:
if "users" not in helper.api.user_list(0, 100, True, False, "", ""):
if "users" not in helper.api.user_list(0, 100, True, False, "", "",
None):
return
if not confirm_prompt():
return
Expand Down

0 comments on commit 66c5bfc

Please sign in to comment.