mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-01 20:03:28 +02:00
refactor: subscription -> address
This commit is contained in:
parent
fe07b37836
commit
3f2859b15d
4 changed files with 20 additions and 19 deletions
|
|
@ -381,12 +381,12 @@ def any_to_str_set(val) -> set:
|
|||
return res
|
||||
|
||||
|
||||
def is_subscribed(message: "Message", tags: set):
|
||||
def is_send_to(message: "Message", addresses: set):
|
||||
"""Return whether it's consumer"""
|
||||
if MESSAGE_ROUTE_TO_ALL in message.send_to:
|
||||
return True
|
||||
|
||||
for i in tags:
|
||||
for i in addresses:
|
||||
if i in message.send_to:
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue