deltabot-cli 7.0.0__tar.gz → 7.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deltabot_cli-7.0.0/deltabot_cli.egg-info → deltabot_cli-7.2.0}/PKG-INFO +2 -2
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/deltabot_cli/cli.py +11 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0/deltabot_cli.egg-info}/PKG-INFO +2 -2
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/deltabot_cli.egg-info/requires.txt +1 -1
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/pyproject.toml +1 -1
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/.github/workflows/python-ci.yml +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/.gitignore +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/LICENSE +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/README.md +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/deltabot_cli/__init__.py +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/deltabot_cli/_utils.py +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/deltabot_cli.egg-info/SOURCES.txt +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/deltabot_cli.egg-info/dependency_links.txt +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/deltabot_cli.egg-info/top_level.txt +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/examples/echobot.py +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/examples/echobot_advanced.py +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/pylama.ini +0 -0
- {deltabot_cli-7.0.0 → deltabot_cli-7.2.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deltabot-cli
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.2.0
|
|
4
4
|
Summary: Library to speedup Delta Chat bot development
|
|
5
5
|
Author-email: adbenitez <adb@merlinux.eu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/deltachat-bot/deltabot-cli-py
|
|
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
|
12
12
|
Requires-Python: >=3.8
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: deltachat2[full]>=0.
|
|
15
|
+
Requires-Dist: deltachat2[full]>=0.8.0
|
|
16
16
|
Requires-Dist: appdirs>=1.4.4
|
|
17
17
|
Requires-Dist: rich>=12.6.0
|
|
18
18
|
Provides-Extra: dev
|
|
@@ -172,6 +172,17 @@ class BotCli:
|
|
|
172
172
|
return rpc.get_config(accid, "configured_addr")
|
|
173
173
|
return rpc.get_config(accid, "addr")
|
|
174
174
|
|
|
175
|
+
def is_admin(self, rpc: Rpc, accid: int, contactid: int) -> bool:
|
|
176
|
+
"""Return True if the contact is an administrator.
|
|
177
|
+
Administrators are the members of the Administration group.
|
|
178
|
+
"""
|
|
179
|
+
chatid = self.get_admin_chat(rpc, accid)
|
|
180
|
+
contacts = rpc.get_chat_contacts(accid, chatid)
|
|
181
|
+
for contact in contacts:
|
|
182
|
+
if contactid == contact:
|
|
183
|
+
return True
|
|
184
|
+
return False
|
|
185
|
+
|
|
175
186
|
def get_admin_chat(self, rpc: Rpc, accid: int) -> int:
|
|
176
187
|
"""Return the bot administration group.
|
|
177
188
|
If the account is not configured, zero is returned.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deltabot-cli
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.2.0
|
|
4
4
|
Summary: Library to speedup Delta Chat bot development
|
|
5
5
|
Author-email: adbenitez <adb@merlinux.eu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/deltachat-bot/deltabot-cli-py
|
|
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
|
12
12
|
Requires-Python: >=3.8
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: deltachat2[full]>=0.
|
|
15
|
+
Requires-Dist: deltachat2[full]>=0.8.0
|
|
16
16
|
Requires-Dist: appdirs>=1.4.4
|
|
17
17
|
Requires-Dist: rich>=12.6.0
|
|
18
18
|
Provides-Extra: dev
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|