leadguru-jobs 0.416.0__py3-none-any.whl → 0.417.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.416.0.dist-info → leadguru_jobs-0.417.0.dist-info}/METADATA +1 -1
- {leadguru_jobs-0.416.0.dist-info → leadguru_jobs-0.417.0.dist-info}/RECORD +6 -6
- lgt_jobs/lgt_data/model.py +1 -0
- lgt_jobs/lgt_data/mongo_repository.py +17 -4
- {leadguru_jobs-0.416.0.dist-info → leadguru_jobs-0.417.0.dist-info}/WHEEL +0 -0
- {leadguru_jobs-0.416.0.dist-info → leadguru_jobs-0.417.0.dist-info}/top_level.txt +0 -0
@@ -38,12 +38,12 @@ lgt_jobs/lgt_data/analytics.py,sha256=qo5nNFQxOTTk8i3tmCq0d3F9iaV9MTIR84SSi6uNrJ
|
|
38
38
|
lgt_jobs/lgt_data/engine.py,sha256=iTcLvU7QZvB14hcERQrxSql9cVEcMEzu_tUcWD2Z24A,8076
|
39
39
|
lgt_jobs/lgt_data/enums.py,sha256=A5nWwBgTVW7XaqL30NHNmO0SG_yeDk1dI-U5xrgU2zg,1552
|
40
40
|
lgt_jobs/lgt_data/helpers.py,sha256=58ycqKF1z5nAw0vs6yVCg-SQet107YHyKYXaQUc7M68,157
|
41
|
-
lgt_jobs/lgt_data/model.py,sha256=
|
42
|
-
lgt_jobs/lgt_data/mongo_repository.py,sha256=
|
41
|
+
lgt_jobs/lgt_data/model.py,sha256=yiDPa2kgOARGMzbRc_heLpu1pRtt4xtf3VcYW7xsjBs,27999
|
42
|
+
lgt_jobs/lgt_data/mongo_repository.py,sha256=mA5UdqEjXiag1S4Guwg01zTgd9RuhX1JgdTTerX01nM,37686
|
43
43
|
lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
44
|
lgt_jobs/services/web_client.py,sha256=D3y5KVVBk7mesRnsiByx4tFmNbfTOKOUoIp3VCHuk0I,1983
|
45
45
|
lgt_jobs/templates/new_message_mail_template.html,sha256=82XdDPtmkJVUWUcZtgd8bv_9-viAG2WWOnf3AhR6PeY,3635
|
46
|
-
leadguru_jobs-0.
|
47
|
-
leadguru_jobs-0.
|
48
|
-
leadguru_jobs-0.
|
49
|
-
leadguru_jobs-0.
|
46
|
+
leadguru_jobs-0.417.0.dist-info/METADATA,sha256=Q8M_uaeh2tVmODwsUwaGRNleyuIed9xa0Gqyli6SmPw,1296
|
47
|
+
leadguru_jobs-0.417.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
48
|
+
leadguru_jobs-0.417.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
|
49
|
+
leadguru_jobs-0.417.0.dist-info/RECORD,,
|
lgt_jobs/lgt_data/model.py
CHANGED
@@ -1002,11 +1002,24 @@ class TeamRepository(BaseMongoRepository):
|
|
1002
1002
|
class ChatRepository(BaseMongoRepository):
|
1003
1003
|
collection_name = 'chat_messages'
|
1004
1004
|
|
1005
|
-
def get_list(self,
|
1005
|
+
def get_list(self, **kwargs):
|
1006
|
+
pipeline = {}
|
1007
|
+
text = kwargs.get('text')
|
1008
|
+
user_id = kwargs.get('user_id')
|
1009
|
+
bot_id = kwargs.get('bot_id')
|
1010
|
+
sender_id = kwargs.get('sender_id')
|
1011
|
+
|
1012
|
+
if text:
|
1013
|
+
pipeline['text'] = {"$regex": text, "$options": 'i'}
|
1014
|
+
if bot_id:
|
1015
|
+
pipeline['bot_id'] = to_object_id(bot_id)
|
1016
|
+
if user_id:
|
1017
|
+
pipeline['user_id'] = to_object_id(user_id)
|
1018
|
+
if sender_id:
|
1019
|
+
pipeline['sender_id'] = sender_id
|
1020
|
+
|
1006
1021
|
return [ChatMessage.from_dic(msg)
|
1007
|
-
for msg in self.collection().find(
|
1008
|
-
'bot_id': to_object_id(bot_id)}).sort("ts",
|
1009
|
-
pymongo.ASCENDING)]
|
1022
|
+
for msg in self.collection().find(pipeline).sort("ts", pymongo.ASCENDING)]
|
1010
1023
|
|
1011
1024
|
def upsert_messages(self, messages: list[dict]):
|
1012
1025
|
operations = [UpdateOne({"ts": msg['ts']}, {'$set': msg}, upsert=True) for msg in messages]
|
File without changes
|
File without changes
|