Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mastofe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pleroma
mastofe
Commits
77efdfa1
Commit
77efdfa1
authored
8 years ago
by
Eugen Rochko
Browse files
Options
Downloads
Patches
Plain Diff
Fixing namespaces issue
parent
45173396
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/services/process_feed_service.rb
+6
-6
6 additions, 6 deletions
app/services/process_feed_service.rb
app/services/process_interaction_service.rb
+1
-1
1 addition, 1 deletion
app/services/process_interaction_service.rb
with
7 additions
and
7 deletions
app/services/process_feed_service.rb
+
6
−
6
View file @
77efdfa1
...
...
@@ -45,7 +45,7 @@ class ProcessFeedService < BaseService
# Also record all media attachments for the status and for the reblogged status if present
unless
status
.
new_record?
record_remote_mentions
(
status
,
entry
.
xpath
(
'./xmlns:link[@rel="mentioned"]'
))
record_remote_mentions
(
status
.
reblog
,
entry
.
xpath
(
'./activity:object/xmlns:link[@rel="mentioned"]'
,
activity:
ACTIVITY_NS
))
if
status
.
reblog?
record_remote_mentions
(
status
.
reblog
,
entry
.
at_
xpath
(
'./activity:object
'
,
activity:
ACTIVITY_NS
).
xpath
(
'.
/xmlns:link[@rel="mentioned"]'
))
if
status
.
reblog?
process_attachments
(
entry
,
status
)
process_attachments
(
entry
.
xpath
(
'./activity:object'
,
activity:
ACTIVITY_NS
),
status
.
reblog
)
if
status
.
reblog?
...
...
@@ -147,8 +147,8 @@ class ProcessFeedService < BaseService
end
def
fetch_remote_status
(
xml
)
username
=
xml
.
at_xpath
(
'./activity:object/xmlns:author/xmlns:name'
,
activity:
ACTIVITY_NS
).
content
url
=
xml
.
at_xpath
(
'./activity:object
/xmlns:author/xmlns:uri
'
,
activity:
ACTIVITY_NS
).
content
username
=
xml
.
at_xpath
(
'./activity:object
'
,
activity:
ACTIVITY_NS
).
at_xpath
(
'.
/xmlns:author/xmlns:name'
).
content
url
=
xml
.
at_xpath
(
'./activity:object'
,
activity:
ACTIVITY_NS
).
at_xpath
(
'./xmlns:author/xmlns:uri'
).
content
domain
=
Addressable
::
URI
.
parse
(
url
).
host
account
=
Account
.
find_remote
(
username
,
domain
)
...
...
@@ -193,7 +193,7 @@ class ProcessFeedService < BaseService
end
def
target_id
(
xml
)
xml
.
at_xpath
(
'.//activity:object
/xmlns:id
'
,
activity:
ACTIVITY_NS
).
content
xml
.
at_xpath
(
'.//activity:object'
,
activity:
ACTIVITY_NS
).
at_xpath
(
'./xmlns:id'
).
content
rescue
nil
end
...
...
@@ -209,11 +209,11 @@ class ProcessFeedService < BaseService
end
def
target_content
(
xml
)
xml
.
at_xpath
(
'.//activity:object
/xmlns:content
'
,
activity:
ACTIVITY_NS
).
content
xml
.
at_xpath
(
'.//activity:object'
,
activity:
ACTIVITY_NS
).
at_xpath
(
'./xmlns:content'
).
content
end
def
target_url
(
xml
)
xml
.
at_xpath
(
'.//activity:object/xmlns:link[@rel="alternate"]'
,
activity:
ACTIVITY_NS
).
attribute
(
'href'
).
value
xml
.
at_xpath
(
'.//activity:object
'
).
at_xpath
(
'.
/xmlns:link[@rel="alternate"]'
,
activity:
ACTIVITY_NS
).
attribute
(
'href'
).
value
end
def
object_type
(
xml
)
...
...
This diff is collapsed.
Click to expand it.
app/services/process_interaction_service.rb
+
1
−
1
View file @
77efdfa1
...
...
@@ -94,7 +94,7 @@ class ProcessInteractionService < BaseService
end
def
activity_id
(
xml
)
xml
.
at_xpath
(
'//activity:object
/xmlns:id
'
,
activity:
ACTIVITY_NS
).
content
xml
.
at_xpath
(
'//activity:object'
,
activity:
ACTIVITY_NS
).
at_xpath
(
'./xmlns:id'
).
content
end
def
salmon
...
...
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