1
0
forked from test/crm
jcrm/crm/twilio/utils.py
Shariq Ansari 50e5fae2b7 fix: initating Call at app level and showing minimized call on sidebar
Handled incoming call UI and outgoing call UI
2023-08-22 16:41:30 +05:30

16 lines
488 B
Python

from frappe.utils import get_url
def get_public_url(path: str=None):
return get_url().split(":8", 1)[0] + path
def merge_dicts(d1: dict, d2: dict):
"""Merge dicts of dictionaries.
>>> merge_dicts(
{'name1': {'age': 20}, 'name2': {'age': 30}},
{'name1': {'phone': '+xxx'}, 'name2': {'phone': '+yyy'}, 'name3': {'phone': '+zzz'}}
)
... {'name1': {'age': 20, 'phone': '+xxx'}, 'name2': {'age': 30, 'phone': '+yyy'}}
"""
return {k:{**v, **d2.get(k, {})} for k, v in d1.items()}