Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide user updates and fix local links in activity feed #2535

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion app/views/activities/_create_actor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@
<%= icon icon_for(thing.class), thing.class.model_name.human %>
</div>
<div class="col">
<%= ((object.profile_url && !thing.is_a?(User)) ? link_to(object.name, object.profile_url) : object.name) %>
<%- if thing.is_a?(User) %>
<%= object.name %>
<%- elsif object.local? %>
<%= link_to thing.name, thing %>
<%- elsif object.profile_url %>
<%= link_to object.name, object.profile_url %>
<%- else %>
<%= object.name %>
<%- end %>
</div>
<% if thing.is_a? Model %>
<div class="col col-auto">
Expand Down
10 changes: 8 additions & 2 deletions app/views/activities/_update_actor.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<%- subject = activity&.actor %>
<%- object = activity&.entity %>
<%- thing = object&.entity %>
<% if thing %>
<% if thing && !thing.is_a?(User) %>
<div class="card border-0 border-bottom">
<div class="card-body py-2">
<div class="row">
<div class="col col-auto">
<%= icon icon_for(thing.class), thing.class.model_name.human %>
</div>
<div class="col">
<%= ((object.profile_url && !thing.is_a?(User)) ? link_to(object.name, object.profile_url) : object.name) %>
<%- if object.local? %>
<%= link_to thing.name, thing %>
<%- elsif object.profile_url %>
<%= link_to object.name, object.profile_url %>
<%- else %>
<%= object.name %>
<%- end %>
</div>
<% if thing.is_a? Model %>
<div class="col col-auto">
Expand Down
Loading