Thanks for adding the region decoder to the packet analyzer! It's a great feature 👍
Shouldn't be too difficult to add that info to the kwargs of the bot api, right?
(Be prepared for another feature request when this is implemented: adding the possibility to set the scope for bot outgoing messages..... would make it possible to reply with the same scope of an incoming message so that bot traffic is being scoped to what's necessary......)
Thanks for adding the region decoder to the packet analyzer! It's a great feature 👍
Shouldn't be too difficult to add that info to the kwargs of the bot api, right?
(Be prepared for another feature request when this is implemented: adding the possibility to set the scope for bot outgoing messages..... would make it possible to reply with the same scope of an incoming message so that bot traffic is being scoped to what's necessary......)
<!-- github-sync-id:4709861138 -->
I've added the receiving region to kwargs and pushed that; will make a mutation to the outbound shape (probably accepting a dict with region) in it sometime next week. Sorry, running low on time this weekend.
I've added the receiving region to kwargs and pushed that; will make a mutation to the outbound shape (probably accepting a dict with region) in it sometime next week. Sorry, running low on time this weekend.
<!-- github-comment-id:4815266210 -->
No worries - I'm very grateful for the time you're sacrificing for this project!!!
Running on latest main now, works great so far!
Only two minor things are missing:
1.) Differentiation between "unknown scope" and "no scope at all"
Currently, region will be None in both cases.....
How about
region == None if there is no scope
region == "" if there is a scope but it could not be decoded?
2.) Region is None always for direct messages but in reality, also direct messages can have a scope: when they are sent as flood direct messages. In such cases, also the packet analyzer will show the scope, for example:
No worries - I'm very grateful for the time you're sacrificing for this project!!!
Running on latest `main` now, works great so far!
Only two minor things are missing:
1.) Differentiation between "unknown scope" and "no scope at all"
Currently, `region` will be `None` in both cases.....
How about
`region == None` if there is no scope
`region == ""` if there is a scope but it could not be decoded?
2.) Region is None always for direct messages but in reality, also direct messages can have a scope: when they are sent as flood direct messages. In such cases, also the packet analyzer will show the scope, for example:
Message bytes: `08ecd1000040e7aa6aa94706d2d9bfa724619d5a2a8ce41d716c`
<img width="1132" height="395" alt="Image" src="https://github.com/user-attachments/assets/15cb8716-a57b-433b-8d5d-a0c8f9b6c287" />
<!-- github-comment-id:4829407287 -->
I'm about to merge a fix to support this more cleanly end to end; I've added scoped, a new bool that is true if this is a region-scoped message and false if not. So checks should use scoped to determine if the packet is scoped at all, and region for the decoded region if we have one available.
ifnotscoped:# plain flood — no scope at allelifregionisNone:# scoped, but we couldn't decode which regionelse:# scoped to a
I'm about to merge a fix to support this more cleanly end to end; I've added `scoped`, a new bool that is true if this is a region-scoped message and false if not. So checks should use `scoped` to determine if the packet is scoped at all, and `region` for the decoded region if we have one available.
```python
if not scoped: # plain flood — no scope at all
elif region is None: # scoped, but we couldn't decode which region
else: # scoped to a
```
<!-- github-comment-id:4920245940 -->
scoped: True if the message carried a regional flood scope, False for
plain/unscoped flood. Check this first — it is the meaningful signal.
Set for scoped DMs too (flood-direct messages can carry a scope).
region: Only meaningful when scoped is True. When scoped is False, region
is always None and should be ignored. When scoped is True, region is
the decoded region name, or None if the scope matched none of your
known_regions (i.e. scoped, but region unrecognized). region is never
enough on its own to tell "unscoped" from "unrecognized" — use scoped.
```
scoped: True if the message carried a regional flood scope, False for
plain/unscoped flood. Check this first — it is the meaningful signal.
Set for scoped DMs too (flood-direct messages can carry a scope).
region: Only meaningful when scoped is True. When scoped is False, region
is always None and should be ignored. When scoped is True, region is
the decoded region name, or None if the scope matched none of your
known_regions (i.e. scoped, but region unrecognized). region is never
enough on its own to tell "unscoped" from "unrecognized" — use scoped.
```
<!-- github-comment-id:4920269824 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Thanks for adding the region decoder to the packet analyzer! It's a great feature 👍
Shouldn't be too difficult to add that info to the kwargs of the bot api, right?
(Be prepared for another feature request when this is implemented: adding the possibility to set the scope for bot outgoing messages..... would make it possible to reply with the same scope of an incoming message so that bot traffic is being scoped to what's necessary......)
I've added the receiving region to kwargs and pushed that; will make a mutation to the outbound shape (probably accepting a dict with region) in it sometime next week. Sorry, running low on time this weekend.
No worries - I'm very grateful for the time you're sacrificing for this project!!!
Running on latest
mainnow, works great so far!Only two minor things are missing:
1.) Differentiation between "unknown scope" and "no scope at all"
Currently,
regionwill beNonein both cases.....How about
region == Noneif there is no scoperegion == ""if there is a scope but it could not be decoded?2.) Region is None always for direct messages but in reality, also direct messages can have a scope: when they are sent as flood direct messages. In such cases, also the packet analyzer will show the scope, for example:
Message bytes:
08ecd1000040e7aa6aa94706d2d9bfa724619d5a2a8ce41d716cI'm about to merge a fix to support this more cleanly end to end; I've added
scoped, a new bool that is true if this is a region-scoped message and false if not. So checks should usescopedto determine if the packet is scoped at all, andregionfor the decoded region if we have one available.