mirror of
https://github.com/simple-login/app.git
synced 2025-09-05 22:24:43 +08:00
Update event dimensions
This commit is contained in:
parent
90dd2bd1db
commit
2871cf2a94
2 changed files with 12 additions and 6 deletions
|
@ -1829,9 +1829,13 @@ class Alias(Base, ModelMixin):
|
|||
agent.record_custom_event(
|
||||
"AliasCreated",
|
||||
{
|
||||
"custom_domain": "yes" if new_alias.custom_domain_id else "no",
|
||||
"from_partner": "yes" if new_alias.is_created_from_partner() else "no",
|
||||
"automatic": "yes" if new_alias.automatic_creation else "no",
|
||||
"custom_domain": "custom domain"
|
||||
if new_alias.custom_domain_id
|
||||
else "base domain",
|
||||
"from_partner": "from partner"
|
||||
if new_alias.is_created_from_partner()
|
||||
else "from sl",
|
||||
"automatic": "automatic" if new_alias.automatic_creation else "manual",
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -2111,8 +2115,8 @@ class Contact(Base, ModelMixin):
|
|||
agent.record_custom_event(
|
||||
"ContactCreated",
|
||||
{
|
||||
"is_cc": new_contact.is_cc,
|
||||
"automatic": "yes" if new_contact.automatic_created else "no",
|
||||
"is_cc": "cc" if new_contact.is_cc else "to",
|
||||
"automatic": "automatic" if new_contact.automatic_created else "manual",
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
@ -242,7 +242,9 @@ def get_or_create_reply_to_contact(
|
|||
)
|
||||
return None
|
||||
|
||||
return contact_utils.create_contact(contact_address, alias, contact_name).contact
|
||||
return contact_utils.create_contact(
|
||||
contact_address, alias, contact_name, automatic_created=True
|
||||
).contact
|
||||
|
||||
|
||||
def replace_header_when_forward(msg: Message, alias: Alias, header: str):
|
||||
|
|
Loading…
Add table
Reference in a new issue