Commit 8f9bef6a authored by Francesco Poldi's avatar Francesco Poldi

Fix followers/following Elasticsearch

parent 0ffce296
...@@ -254,13 +254,19 @@ def Follow(user, config): ...@@ -254,13 +254,19 @@ def Follow(user, config):
global _index_follow_status global _index_follow_status
actions = [] actions = []
if config.Following:
_user = config.Username
_follow = user
else:
_user = user
_follow = config.Username
j_data = { j_data = {
"_index": config.Index_follow, "_index": config.Index_follow,
"_type": config.Index_type, "_type": config.Index_type,
"_id": user + "_" + config.Username + "_" + config.Essid, "_id": _user + "_" + _follow + "_" + config.Essid,
"_source": { "_source": {
"user": user, "user": _user,
"follow": config.Username, "follow": _follow,
"essid": config.Essid "essid": config.Essid
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment