sc-common-interface 2.9.9__tar.gz → 3.0.0__tar.gz
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.
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/PKG-INFO +1 -1
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/LiveCommonInterface.py +13 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/setup.py +1 -1
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/CommonOa.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/McCommonInterface.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/OperaMysql.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/OperaRedis.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/ScPulsar.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/ScWebsocket.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/__init__.py +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/setup.cfg +0 -0
{sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -235,6 +235,7 @@ def send__live_comment(data):
|
|
|
235
235
|
keyword = data.get("keyword", keyword)
|
|
236
236
|
# sales_type = data.get("sales_type", "live")
|
|
237
237
|
relationUrl = data.get("relationUrl","")
|
|
238
|
+
comment_type = data.get("comment_type","comment")
|
|
238
239
|
if page_id == "" or post_id == "key":
|
|
239
240
|
page_info = get_page_info(data)
|
|
240
241
|
page_id = page_info["page_id"]
|
|
@@ -272,6 +273,18 @@ def send__live_comment(data):
|
|
|
272
273
|
body = {"object":"page","entry":[{"id":page_id,"time":t_time,"messaging":[{"recipient":{"id":page_id},"message":keyword,
|
|
273
274
|
"from":{"id":user_id,"name":name},"group_id":group_id,"post_id":post_id,"comment_id":comment_id,"created_time":stamp,"item":"comment",
|
|
274
275
|
"verb":"add","parent_id":post_id,"field":"group_feed"}]}]}
|
|
276
|
+
elif platform.upper()=="FACEBOOK":
|
|
277
|
+
if "comment_type"=="comment":
|
|
278
|
+
body = {"object": "page", "entry": [{"id": page_id, "time": stamp, "changes": [{"field": "feed", "value": {
|
|
279
|
+
"from": {"id": user_id, "name": name},
|
|
280
|
+
"post": {"status_type": "added_video", "is_published": True, "updated_time": "2022-11-18T09:57:26+0000",
|
|
281
|
+
"permalink_url": "https://www.facebook.com/permalink.php?story_fbid=pfbid02jLK3e6YdFSXp2DmD7j7vtStLXoBzTi8rxKrp6jFhVMUTTEgz6qvZA8soR9Uwydd8l&id=107977035056574",
|
|
282
|
+
"promotion_status": "inactive", "id": post_id}, "message": keyword, "item": "comment",
|
|
283
|
+
"verb": "add", "post_id": post_id, "comment_id": comment_id,
|
|
284
|
+
"created_time": stamp, "parent_id": post_id}}]}]}
|
|
285
|
+
elif "comment_type"=="like":
|
|
286
|
+
body = {"entry": [{"id": page_id, "time": stamp, "changes": [{"value": {"from": {"id": user_id, "name": name}, "post_id": post_id, "created_time": stamp, "item": "reaction", "parent_id": post_id, "reaction_type": "like", "verb": "add"}, "field": "feed"}]}], "object": "page"}
|
|
287
|
+
|
|
275
288
|
# print(body)
|
|
276
289
|
url = "%s/facebook/webhook" % env
|
|
277
290
|
sign_text = hmac.new(key.encode("utf-8"), json.dumps(body).encode("utf-8"), sha1)
|
|
File without changes
|
{sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc_common_interface-2.9.9 → sc_common_interface-3.0.0}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|