mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 06:27:59 +00:00
Fix NameError when getting nodeinfo software name in processors
This commit is contained in:
parent
6b86bb7d98
commit
9f58c88e9f
|
@ -50,7 +50,7 @@ async def handle_forward(request):
|
||||||
|
|
||||||
async def handle_follow(request):
|
async def handle_follow(request):
|
||||||
nodeinfo = await request.app.client.fetch_nodeinfo(request.actor.domain)
|
nodeinfo = await request.app.client.fetch_nodeinfo(request.actor.domain)
|
||||||
software = nodeinfo.swname if nodeinfo else None
|
software = nodeinfo.sw_name if nodeinfo else None
|
||||||
|
|
||||||
## reject if software used by actor is banned
|
## reject if software used by actor is banned
|
||||||
if request.config.is_banned_software(software):
|
if request.config.is_banned_software(software):
|
||||||
|
@ -119,7 +119,7 @@ async def run_processor(request):
|
||||||
nodeinfo = await request.app.client.fetch_nodeinfo(request.instance['domain'])
|
nodeinfo = await request.app.client.fetch_nodeinfo(request.instance['domain'])
|
||||||
|
|
||||||
if nodeinfo:
|
if nodeinfo:
|
||||||
request.instance['software'] = nodeinfo.swname
|
request.instance['software'] = nodeinfo.sw_name
|
||||||
request.database.save()
|
request.database.save()
|
||||||
|
|
||||||
logging.verbose(f'New "{request.message.type}" from actor: {request.actor.id}')
|
logging.verbose(f'New "{request.message.type}" from actor: {request.actor.id}')
|
||||||
|
|
Loading…
Reference in a new issue