Merge branch 'release/0.5.9.0'
This commit is contained in:
commit
a2864b9f40
11 changed files with 40 additions and 12 deletions
|
|
@ -30,6 +30,6 @@ script: "./script/ci/build.sh"
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
channels:
|
channels:
|
||||||
- "irc.freenode.org:6667#diaspora-dev"
|
- secure: YvYkeTAw+5oOl/RaXVwu7JkKGNWPoFosNQRmLvJkBFbWzZ1s5LZD1u3+Qj819bT3lGzJu9pxmJg765IRYrGWmBi4mcAV3dpO6qowVdFTcorf0JsnLw3Kvkga9rrDunsRNr21KTAQqHOO5mKUzw9DtMzd52BiWuZwIj3xcl72gQI=
|
||||||
template:
|
template:
|
||||||
- "%{repository_slug}#%{commit} (%{branch} - %{commit_subject}): %{message} %{build_url}"
|
- "%{repository_slug}#%{commit} (%{branch} - %{commit_subject}): %{message} %{build_url}"
|
||||||
|
|
|
||||||
13
Changelog.md
13
Changelog.md
|
|
@ -1,3 +1,16 @@
|
||||||
|
# 0.5.9.0
|
||||||
|
|
||||||
|
## Refactor
|
||||||
|
* Remove unused mentions regex [#6810](https://github.com/diaspora/diaspora/pull/6810)
|
||||||
|
|
||||||
|
## Bug fixes
|
||||||
|
* Fix back to top button not appearing on Webkit browsers [#6782](https://github.com/diaspora/diaspora/pull/6782)
|
||||||
|
* Don't reset the notification timestamp when marking them as read [#6821](https://github.com/diaspora/diaspora/pull/6821)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
* The sender's diaspora-ID is now shown in invitation mails [#6817](https://github.com/diaspora/diaspora/pull/6817)
|
||||||
|
|
||||||
# 0.5.8.0
|
# 0.5.8.0
|
||||||
|
|
||||||
## Refactor
|
## Refactor
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ app.views.BackToTop = Backbone.View.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleVisibility: function() {
|
toggleVisibility: function() {
|
||||||
if($("html, body").scrollTop() > 1000) {
|
if($(document).scrollTop() > 1000) {
|
||||||
$("#back-to-top").addClass("visible");
|
$("#back-to-top").addClass("visible");
|
||||||
} else {
|
} else {
|
||||||
$("#back-to-top").removeClass("visible");
|
$("#back-to-top").removeClass("visible");
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class InvitationsController < ApplicationController
|
||||||
else
|
else
|
||||||
params[:invitation_code]
|
params[:invitation_code]
|
||||||
end
|
end
|
||||||
|
@inviter = user || InvitationCode.where(id: params[:invitation_code]).first.try(:user)
|
||||||
if @invitation_code.present?
|
if @invitation_code.present?
|
||||||
render 'notifier/invite', :layout => false
|
render 'notifier/invite', :layout => false
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
class Mention < ActiveRecord::Base
|
class Mention < ActiveRecord::Base
|
||||||
REGEX = /@\{([^;]+); ([^\}]+)\}/
|
|
||||||
|
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
belongs_to :person
|
belongs_to :person
|
||||||
validates :post, :presence => true
|
validates :post, :presence => true
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ class Notification < ActiveRecord::Base
|
||||||
belongs_to :target, :polymorphic => true
|
belongs_to :target, :polymorphic => true
|
||||||
|
|
||||||
attr_accessor :note_html
|
attr_accessor :note_html
|
||||||
|
|
||||||
def self.for(recipient, opts={})
|
def self.for(recipient, opts={})
|
||||||
self.where(opts.merge!(:recipient_id => recipient.id)).order('updated_at desc')
|
self.where(opts.merge!(:recipient_id => recipient.id)).order('updated_at desc')
|
||||||
end
|
end
|
||||||
|
|
@ -29,7 +29,7 @@ class Notification < ActiveRecord::Base
|
||||||
actor, note_type)
|
actor, note_type)
|
||||||
end
|
end
|
||||||
return_note.email_the_user(target, actor) if return_note
|
return_note.email_the_user(target, actor) if return_note
|
||||||
return_note
|
return_note
|
||||||
end
|
end
|
||||||
|
|
||||||
def as_json(opts={})
|
def as_json(opts={})
|
||||||
|
|
@ -41,7 +41,7 @@ class Notification < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_read_state( read_state )
|
def set_read_state( read_state )
|
||||||
self.update_attributes( :unread => !read_state )
|
update_column(:unread, !read_state)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mail_job
|
def mail_job
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<%= t('.message', :invite_url => invite_code_url(@invitation_code), :diasporafoundation_url => 'https://diasporafoundation.org/') %>
|
<%= t('.message', :invite_url => invite_code_url(@invitation_code), :diasporafoundation_url => 'https://diasporafoundation.org/', :diaspora_id => @inviter.try(:diaspora_handle)) %>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
version:
|
version:
|
||||||
number: "0.5.8.0" # Do not touch unless doing a release, do not backport the version number that's in master
|
number: "0.5.9.0" # Do not touch unless doing a release, do not backport the version number that's in master
|
||||||
heroku: false
|
heroku: false
|
||||||
environment:
|
environment:
|
||||||
url: "http://localhost:3000/"
|
url: "http://localhost:3000/"
|
||||||
|
|
|
||||||
|
|
@ -838,12 +838,14 @@ en:
|
||||||
message: |-
|
message: |-
|
||||||
Hello!
|
Hello!
|
||||||
|
|
||||||
You have been invited to join diaspora*!
|
You have been invited to join diaspora* by %{diaspora_id}!
|
||||||
|
|
||||||
Click this link to get started
|
Click this link to get started
|
||||||
|
|
||||||
[%{invite_url}][1]
|
[%{invite_url}][1]
|
||||||
|
|
||||||
|
Or you can add %{diaspora_id} to your contacts if you already have an account.
|
||||||
|
|
||||||
|
|
||||||
Love,
|
Love,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,19 @@ describe NotificationsController, :type => :controller do
|
||||||
get :update, "id" => note.id, :set_unread => "true", :format => :json
|
get :update, "id" => note.id, :set_unread => "true", :format => :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "marks a notification as unread without timestamping" do
|
||||||
|
note = Timecop.travel(1.hour.ago) do
|
||||||
|
FactoryGirl.create(:notification, recipient: alice, unread: false)
|
||||||
|
end
|
||||||
|
|
||||||
|
get :update, "id" => note.id, :set_unread => "true", :format => :json
|
||||||
|
expect(response).to be_success
|
||||||
|
|
||||||
|
updated_note = Notification.find(note.id)
|
||||||
|
expect(updated_note.unread).to eq(true)
|
||||||
|
expect(updated_note.updated_at.iso8601).to eq(note.updated_at.iso8601)
|
||||||
|
end
|
||||||
|
|
||||||
it 'only lets you read your own notifications' do
|
it 'only lets you read your own notifications' do
|
||||||
user2 = bob
|
user2 = bob
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,15 +41,17 @@ describe Notification, :type => :model do
|
||||||
describe 'set_read_state method' do
|
describe 'set_read_state method' do
|
||||||
it "should set an unread notification to read" do
|
it "should set an unread notification to read" do
|
||||||
@note.unread = true
|
@note.unread = true
|
||||||
|
@note.save
|
||||||
@note.set_read_state( true )
|
@note.set_read_state( true )
|
||||||
expect(@note.unread).to eq(false)
|
expect(@note.unread).to eq(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should set an read notification to unread" do
|
it "should set an read notification to unread" do
|
||||||
@note.unread = false
|
@note.unread = false
|
||||||
|
@note.save
|
||||||
@note.set_read_state( false )
|
@note.set_read_state( false )
|
||||||
expect(@note.unread).to eq(true)
|
expect(@note.unread).to eq(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue