Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
e1194839
Commit
e1194839
authored
4 years ago
by
Dariusz Kędzierski
Committed by
Jason Salyers
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Mimic old hivemind behaviour for follower, following check. Use get_follow_count for testing
parent
fd13f0a7
No related branches found
No related tags found
2 merge requests
!456
Release candidate v1 24
,
!370
Jsalyers muting at sql level
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hive/indexer/follow.py
+0
-9
0 additions, 9 deletions
hive/indexer/follow.py
mock_data/block_data/follow_op/mock_block_data_follow.json
+0
-77
0 additions, 77 deletions
mock_data/block_data/follow_op/mock_block_data_follow.json
with
0 additions
and
86 deletions
hive/indexer/follow.py
+
0
−
9
View file @
e1194839
...
...
@@ -87,15 +87,6 @@ class Follow(DbAdapterHolder):
return
None
op
[
'
following
'
]
=
op
[
'
following
'
]
if
isinstance
(
op
[
'
following
'
],
list
)
else
[
op
[
'
following
'
]]
# additional layer of protection against putting complex data types as user names
as_str
=
[]
for
following
in
op
[
'
following
'
]:
if
isinstance
(
following
,
list
)
or
isinstance
(
following
,
dict
):
as_str
.
append
(
dumps
(
following
))
else
:
as_str
.
append
(
str
(
following
))
op
[
'
following
'
]
=
as_str
# mimic original behaviour
# if following name does not exist do not process it: basically equal to drop op for single following entry
...
...
This diff is collapsed.
Click to expand it.
mock_data/block_data/follow_op/mock_block_data_follow.json
+
0
−
77
View file @
e1194839
...
...
@@ -442,83 +442,6 @@
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:
\"
tester1
\"
,
\"
following
\"
:[
\"
tester3
\"
, {
\"
gtg
\"
:
\"
gtg
\"
}],
\"
what
\"
:[
\"
blog
\"
]}]"
}
},
{
"type"
:
"custom_json_operation"
,
"value"
:
{
"required_auths"
:
[],
"required_posting_auths"
:
[
"tester1"
],
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:
\"
tester1
\"
,
\"
following
\"
:[
\"
tester7
\"
,
\"
<script>alert('hello world');</script>
\"
],
\"
what
\"
:[
\"
blog
\"
]}]"
}
},
{
"type"
:
"custom_json_operation"
,
"value"
:
{
"required_auths"
:
[],
"required_posting_auths"
:
[
"{
\"
tester1
\"
:
\"
tester1
\"
}"
],
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:{
\"
tester1
\"
:
\"
tester1
\"
},
\"
following
\"
:{
\"
tester3
\"
:
\"
tester4
\"
},
\"
what
\"
:[
\"
blog
\"
]}]"
}
},
{
"type"
:
"custom_json_operation"
,
"value"
:
{
"required_auths"
:
[],
"required_posting_auths"
:
[
"tester1"
],
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:
\"
tester1
\"
,
\"
following
\"
:{
\"
tester3
\"
:
\"
tester4
\"
},
\"
what
\"
:[
\"
blog
\"
]}]"
}
},
{
"type"
:
"custom_json_operation"
,
"value"
:
{
"required_auths"
:
[],
"required_posting_auths"
:
[
"tester1"
],
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:
\"
tester1
\"
,
\"
following
\"
:[
\"
tester3
\"
, [
\"
tester4
\"
]],
\"
what
\"
:[
\"
blog
\"
]}]"
}
},
{
"type"
:
"custom_json_operation"
,
"value"
:
{
"required_auths"
:
[],
"required_posting_auths"
:
[
"tester1"
],
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:[
\"
tester1
\"
],
\"
following
\"
:[
\"
tester3
\"
, [
\"
tester4
\"
]],
\"
what
\"
:[
\"
blog
\"
]}]"
}
},
{
"type"
:
"custom_json_operation"
,
"value"
:
{
"required_auths"
:
[],
"required_posting_auths"
:
[
"[
\"
tester1
\"
]"
],
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:[
\"
tester1
\"
],
\"
following
\"
:[
\"
tester3
\"
, {
\"
tester4
\"
:
\"
tester5
\"
}],
\"
what
\"
:[
\"
blog
\"
]}]"
}
},
{
"type"
:
"custom_json_operation"
,
"value"
:
{
"required_auths"
:
[],
"required_posting_auths"
:
[
"tester1"
],
"id"
:
"follow"
,
"json"
:
"[
\"
follow
\"
,{
\"
follower
\"
:
\"
tester1
\"
,
\"
following
\"
:[
\"
tester3
\"
, {
\"
tester4
\"
:
\"
tester5
\"
}],
\"
what
\"
:[
\"
blog
\"
]}]"
}
}
]
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment