leadguru-jobs 0.669.0__py3-none-any.whl → 0.671.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {leadguru_jobs-0.669.0.dist-info → leadguru_jobs-0.671.0.dist-info}/METADATA +1 -1
- {leadguru_jobs-0.669.0.dist-info → leadguru_jobs-0.671.0.dist-info}/RECORD +6 -6
- lgt_jobs/lgt_data/models/chat/message.py +6 -16
- lgt_jobs/lgt_data/models/notifications/notification.py +61 -62
- {leadguru_jobs-0.669.0.dist-info → leadguru_jobs-0.671.0.dist-info}/WHEEL +0 -0
- {leadguru_jobs-0.669.0.dist-info → leadguru_jobs-0.671.0.dist-info}/top_level.txt +0 -0
@@ -56,7 +56,7 @@ lgt_jobs/lgt_data/models/bots/dedicated_bot.py,sha256=TubetS51njRtgTse8ihYSA2vyc
|
|
56
56
|
lgt_jobs/lgt_data/models/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
57
|
lgt_jobs/lgt_data/models/chat/file.py,sha256=agvvPxkt9jsrxLmlDAi6EnirkiHy7u0u2qN6X0YaMAE,183
|
58
58
|
lgt_jobs/lgt_data/models/chat/grouped_messages.py,sha256=Dcajejrx1HIu09ndlt5g3oGz9bueNolcqI-s9Xy1eak,394
|
59
|
-
lgt_jobs/lgt_data/models/chat/message.py,sha256=
|
59
|
+
lgt_jobs/lgt_data/models/chat/message.py,sha256=rSjgK_MQ_FcYq6zStPTKsIemuIway9XKgOCc2OftgR4,2493
|
60
60
|
lgt_jobs/lgt_data/models/chat/request.py,sha256=CdgsZdrwZTEBKBGMtSYh0MwRsiLAwbaH54foo8P2DRQ,515
|
61
61
|
lgt_jobs/lgt_data/models/chat/scheduled_message.py,sha256=vv5c_Fe6L9eDeV9LHrdPCU2p-VQ0v_YsZDMBdXvFQAA,268
|
62
62
|
lgt_jobs/lgt_data/models/contacts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -76,7 +76,7 @@ lgt_jobs/lgt_data/models/leads/extended_lead.py,sha256=ezFrKv-f5GBXr3QAM-V_qJQ-i
|
|
76
76
|
lgt_jobs/lgt_data/models/leads/lead.py,sha256=mTZh8YV06nX9OWYvv_X7rDdIperB-RPChrEuheeYMU0,1300
|
77
77
|
lgt_jobs/lgt_data/models/leads/message.py,sha256=7mXwYfSpmhY_zC8TfUdAZzxsPP-02bOqVjdkN4Vid5s,1533
|
78
78
|
lgt_jobs/lgt_data/models/notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
79
|
-
lgt_jobs/lgt_data/models/notifications/notification.py,sha256=
|
79
|
+
lgt_jobs/lgt_data/models/notifications/notification.py,sha256=FyX07HrKbDPcixxyMA_Bf-FIAcJQOINBaAavSbibcY8,19598
|
80
80
|
lgt_jobs/lgt_data/models/notifications/notification_settings.py,sha256=VFddLvk2ROz4n50wYuZmqBDn7MssFwj-e9DbWweIVA4,2780
|
81
81
|
lgt_jobs/lgt_data/models/people/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
82
82
|
lgt_jobs/lgt_data/models/people/people.py,sha256=pm60uMVmNIxOGCBAtZWhmXSJOe0SJ4C1y_HurUq00oY,3420
|
@@ -105,7 +105,7 @@ lgt_jobs/lgt_data/repositories/post/posts.py,sha256=ZA19L-CYdxLhlapyMQtSJzP3QMUl
|
|
105
105
|
lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
106
106
|
lgt_jobs/services/web_client.py,sha256=oMyWJxwGeIe3f40fPT7xcisjDg3BhA3Ipf8dr1jVT-Y,1549
|
107
107
|
lgt_jobs/templates/new_message.html,sha256=dZl8UmdAOOMq4nidvAgMFroSrTV7Pw0RWt2yLp_2idg,6989
|
108
|
-
leadguru_jobs-0.
|
109
|
-
leadguru_jobs-0.
|
110
|
-
leadguru_jobs-0.
|
111
|
-
leadguru_jobs-0.
|
108
|
+
leadguru_jobs-0.671.0.dist-info/METADATA,sha256=ViD1T-2g9FfEqIKUHocmn_nn00S9GSAl_2pcohXe2n4,1319
|
109
|
+
leadguru_jobs-0.671.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
110
|
+
leadguru_jobs-0.671.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
|
111
|
+
leadguru_jobs-0.671.0.dist-info/RECORD,,
|
@@ -3,11 +3,12 @@ from datetime import datetime
|
|
3
3
|
|
4
4
|
from bson import ObjectId
|
5
5
|
|
6
|
+
from lgt_jobs.lgt_data.models.base import DictionaryModel
|
6
7
|
from lgt_jobs.lgt_data.models.bots.dedicated_bot import DedicatedBotModel
|
7
8
|
from lgt_jobs.lgt_data.models.chat.file import LeadGuruFile
|
8
9
|
|
9
10
|
|
10
|
-
class ChatMessage:
|
11
|
+
class ChatMessage(DictionaryModel):
|
11
12
|
bot_id: ObjectId
|
12
13
|
user_id: ObjectId
|
13
14
|
sender_id: str
|
@@ -20,20 +21,6 @@ class ChatMessage:
|
|
20
21
|
created_at: datetime | None
|
21
22
|
source_id: str | None
|
22
23
|
|
23
|
-
class SlackFileModel:
|
24
|
-
def __init__(self):
|
25
|
-
self.id = None
|
26
|
-
self.name = None
|
27
|
-
self.title = None
|
28
|
-
self.filetype = None
|
29
|
-
self.size = 0
|
30
|
-
self.mimetype = None
|
31
|
-
self.download_url = None
|
32
|
-
|
33
|
-
def to_dic(self):
|
34
|
-
result = copy.deepcopy(self.__dict__)
|
35
|
-
return result
|
36
|
-
|
37
24
|
def __init__(self):
|
38
25
|
self.viewed = False
|
39
26
|
self.text: str = ''
|
@@ -45,7 +32,7 @@ class ChatMessage:
|
|
45
32
|
|
46
33
|
def to_dic(self):
|
47
34
|
result = copy.deepcopy(self.__dict__)
|
48
|
-
result['files'] = [x.to_dic() for x in result.get('files', [])]
|
35
|
+
result['files'] = [x.to_dic() for x in result.get('files', []) if not isinstance(x, dict)]
|
49
36
|
return result
|
50
37
|
|
51
38
|
@classmethod
|
@@ -55,6 +42,9 @@ class ChatMessage:
|
|
55
42
|
model = cls()
|
56
43
|
for k, v in dic.items():
|
57
44
|
setattr(model, k, v)
|
45
|
+
|
46
|
+
if dic.get('files'):
|
47
|
+
model.files = [LeadGuruFile.from_dic(x) for x in dic.get('files', [])]
|
58
48
|
return model
|
59
49
|
|
60
50
|
@classmethod
|
@@ -55,70 +55,69 @@ class IncomingMessageNotification(Notification):
|
|
55
55
|
|
56
56
|
other_leads_text = ' and other leads.'
|
57
57
|
name_html_item = '''
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
58
|
+
<div style="display: inline-block; padding-left: 2px" class="lead_names">
|
59
|
+
<img alt="Lead Photo" src="$$USER_IMAGE$$" width="24" height="24"
|
60
|
+
style="background-color: #FFFFFE !important; display: inline-block; vertical-align: top; width: 24px;
|
61
|
+
max-width: 24px; min-width: 24px; font-family: 'Outfit', Helvetica, Arial, sans-serif; color: #FFFFFE;
|
62
|
+
border-radius: 50% !important; font-size: 16px;" border="0">
|
63
|
+
<span style="font-weight: 600;">$$USER_NAME$$</span>
|
64
|
+
</div>
|
65
|
+
'''
|
66
66
|
view_message_html_item = '''
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
67
|
+
<td align="right" class="pr-text-dark" style="width: 100%">
|
68
|
+
<a href="$$VIEW_MESSAGE_URL$$" target="_blank"style="color: #3579F6; font-family: 'Outfit', Helvetica, Arial,
|
69
|
+
sans-serif; font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: none;
|
70
|
+
display: inline-block;">View message <img alt="View message" src="{{ IMAGE_ARROW_BLUE.src }}" width="16"
|
71
|
+
height="16" style="display: inline-block; vertical-align: middle; width: 16px; max-width: 16px;
|
72
|
+
min-width: 16px; margin: 0 -1px 4px 7px" border="0"></a>
|
73
|
+
</td>'''
|
75
74
|
unread_message_html_item = '''
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
75
|
+
<tr>
|
76
|
+
<td bgcolor="#FFFFFE" align="left" style="padding-top: 16px;"
|
77
|
+
class="pr-bg-dark pr-text-dark">
|
78
|
+
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
|
79
|
+
<tr>
|
80
|
+
<td bgcolor="#FFFFFE" align="left"
|
81
|
+
class="pr-bg-dark pr-text-dark"
|
82
|
+
style="font-family: 'Outfit', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 20px;">
|
83
|
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0"
|
84
|
+
style="border-collapse: separate !important;">
|
85
|
+
<tr>
|
86
|
+
<td align="center" bgcolor="#FFFFFE" style="border-radius: 50% !important;">
|
87
|
+
<img alt="Lead Photo" src="$$USER_IMAGE$$" width="24"
|
88
|
+
height="24"
|
89
|
+
style="display: inline-block; vertical-align: middle; width: 24px; max-width: 24px; min-width: 24px; font-family: 'Outfit', Helvetica, Arial, sans-serif; color: #FFFFFE; border-radius: 50% !important; font-size: 16px;"
|
90
|
+
border="0">
|
91
|
+
</td>
|
92
|
+
<td align="center"
|
93
|
+
class="pr-text-dark"
|
94
|
+
style="white-space: nowrap; font-family: 'Outfit', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 600; line-height: 20px; padding-left: 4px">
|
95
|
+
$$USER_NAME$$
|
96
|
+
</td>
|
97
|
+
$$VIEW_MESSAGE_BUTTON$$
|
98
|
+
</tr>
|
99
|
+
</table>
|
100
|
+
</td>
|
101
|
+
</tr>
|
102
|
+
|
103
|
+
<tr>
|
104
|
+
<td align="left" style="padding-top: 8px">
|
105
|
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0"
|
106
|
+
style="border-collapse: separate !important;">
|
107
|
+
<tr>
|
108
|
+
<td align="left" bgcolor="#F6F6F8"
|
109
|
+
class="sec-bg-dark pr-text-dark"
|
110
|
+
style="color: #262730; font-family: 'Outfit', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 20px; padding: 12px; border-radius: 0 12px 12px 12px !important; background-color: #F6F6F8">
|
111
|
+
$$MESSAGE_TEXT$$
|
112
|
+
</td>
|
113
|
+
</tr>
|
114
|
+
</table>
|
115
|
+
</td>
|
116
|
+
</tr>
|
117
|
+
</table>
|
118
|
+
</td>
|
119
|
+
</tr>
|
120
|
+
'''
|
122
121
|
|
123
122
|
@staticmethod
|
124
123
|
def get_button_name() -> str:
|
File without changes
|
File without changes
|