Compare commits

...

2 commits

Author SHA1 Message Date
wulan17
ec6f737cfb
pyrofork: types: MessageReactor: fix derps
Some checks failed
Build-docs / build (push) Has been cancelled
Pyrofork / build (macos-latest, 3.10) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.11) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.12) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.13) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.9) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.10) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.11) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.12) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.13) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.9) (push) Has been cancelled
Signed-off-by: wulan17 <wulan17@komodos.id>
2025-03-30 22:12:55 +07:00
wulan17
cc42107fd7
pyrofork: disable publish workflows
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2025-03-30 22:09:55 +07:00
2 changed files with 5 additions and 45 deletions

View file

@ -1,40 +0,0 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
push:
tags:
- '*'
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Build package
run: hatch build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1

View file

@ -58,14 +58,14 @@ class MessageReactor(Object):
sender_chat: "types.Chat" = None
):
super().__init__(client)
self.amount = amount
self.is_top = is_top
self.is_my = is_my
self.is_anonymous = is_anonymous
self.from_user = from_user
self.sender_chat = sender_chat
@staticmethod
def _parse(
client: "pyrogram.Client",
@ -75,17 +75,17 @@ class MessageReactor(Object):
) -> Optional["MessageReactor"]:
if not message_reactor:
return None
is_anonymous = message_reactor.anonymous
from_user = None
sender_chat = None
if not is_anonymous:
if isinstance(message_reactor.peer, raw.types.PeerUser):
if isinstance(message_reactor.peer_id, raw.types.PeerUser):
from_user = types.User._parse(
client,
users.get(message_reactor.peer_id.user_id)
)
elif isinstance(message_reactor.peer, raw.types.PeerChannel):
elif isinstance(message_reactor.peer_id, raw.types.PeerChannel):
sender_chat = types.Chat._parse_channel_chat(
client,
chats.get(message_reactor.peer_id.channel_id)