Skip to content

Commit d2c7167

Browse files
authored
fix: In the floating window embedding, the user in the conversation is displayed as a tourist #4019 (#4075)
1 parent c9634f9 commit d2c7167

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/application/serializers/application_serializers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ def get_embed(self, with_valid=True, params=None):
322322

323323
def get_query_api_input(self, application, params):
324324
query = ''
325+
is_asker = False
325326
if application.work_flow is not None:
326327
work_flow = application.work_flow
327328
if work_flow is not None:
@@ -333,8 +334,10 @@ def get_query_api_input(self, application, params):
333334
if input_field_list is not None:
334335
for field in input_field_list:
335336
if field['assignment_method'] == 'api_input' and field['variable'] in params:
337+
if field['variable'] == 'asker':
338+
is_asker = True
336339
query += f"&{field['variable']}={params[field['variable']]}"
337-
if 'asker' in params:
340+
if 'asker' in params and not is_asker:
338341
query += f"&asker={params.get('asker')}"
339342
return query
340343

0 commit comments

Comments
 (0)