* Add: `conversations`テーブルに`ancestor_status`プロパティ * Fix test * Fix test more * Add: `limited_visibility`に`Reply`を追加、`context`のURI * Add: 外部からの`context`受信処理 * Fix test * Add: 公開範囲「返信」 * Fix test * Fix: 返信に返信以外の公開範囲を設定できない問題 * Add: ローカル投稿時にメンション追加・他サーバーへの転送 * Fix test * Fix test * Test: ローカルスレッドへの返信投稿の転送 * Test: 未知のアカウントからのメンション * Add: 編集・削除の連合に対応 * Remove: 重複テスト * Fix: 改善 * Add: 編集削除の転送処理・返信なのにsilentなメンションでの通知 * Fix: リプライが第三者に届かない問題 * Add: `always_sign_unsafe` * Add: Subject * Remove space * Fix: 他人のスレッドの送信先一覧を非表示 * Fix: おかしいコード
This commit is contained in:
parent
a52a8ce214
commit
a88349af55
42 changed files with 1115 additions and 77 deletions
|
@ -77,6 +77,7 @@ const initialState = ImmutableMap({
|
|||
caretPosition: null,
|
||||
preselectDate: null,
|
||||
in_reply_to: null,
|
||||
reply_to_limited: false,
|
||||
is_composing: false,
|
||||
is_submitting: false,
|
||||
is_changing_upload: false,
|
||||
|
@ -114,6 +115,10 @@ const initialPoll = ImmutableMap({
|
|||
});
|
||||
|
||||
function statusToTextMentions(state, status) {
|
||||
if (status.get('visibility_ex') === 'limited') {
|
||||
return '';
|
||||
}
|
||||
|
||||
let set = ImmutableOrderedSet([]);
|
||||
|
||||
if (status.getIn(['account', 'id']) !== me) {
|
||||
|
@ -144,6 +149,7 @@ function clearAll(state) {
|
|||
if (!state.get('in_reply_to')) {
|
||||
map.set('posted_on_this_session', true);
|
||||
}
|
||||
map.set('reply_to_limited', false);
|
||||
map.set('limited_scope', null);
|
||||
map.set('id', null);
|
||||
map.set('in_reply_to', null);
|
||||
|
@ -411,7 +417,12 @@ export default function compose(state = initialState, action) {
|
|||
map.set('id', null);
|
||||
map.set('in_reply_to', action.status.get('id'));
|
||||
map.set('text', statusToTextMentions(state, action.status));
|
||||
map.set('privacy', privacyPreference(action.status.get('visibility_ex'), state.get('default_privacy')));
|
||||
map.set('reply_to_limited', action.status.get('visibility_ex') === 'limited');
|
||||
if (action.status.get('visibility_ex') === 'limited') {
|
||||
map.set('privacy', 'reply');
|
||||
} else {
|
||||
map.set('privacy', privacyPreference(action.status.get('visibility_ex'), state.get('default_privacy')));
|
||||
}
|
||||
map.set('limited_scope', null);
|
||||
map.set('searchability', privacyPreference(action.status.get('searchability'), state.get('default_searchability')));
|
||||
map.set('focusDate', new Date());
|
||||
|
@ -521,7 +532,11 @@ export default function compose(state = initialState, action) {
|
|||
return state.set('tagHistory', fromJS(action.tags));
|
||||
case TIMELINE_DELETE:
|
||||
if (action.id === state.get('in_reply_to')) {
|
||||
return state.set('in_reply_to', null);
|
||||
if (state.get('privacy') === 'reply') {
|
||||
return state.set('in_reply_to', null).set('privacy', 'circle');
|
||||
} else {
|
||||
return state.set('in_reply_to', null);
|
||||
}
|
||||
} else if (action.id === state.get('id')) {
|
||||
return state.set('id', null);
|
||||
} else {
|
||||
|
@ -549,6 +564,7 @@ export default function compose(state = initialState, action) {
|
|||
map.set('text', action.raw_text || unescapeHTML(expandMentions(action.status)));
|
||||
map.set('in_reply_to', action.status.get('in_reply_to_id'));
|
||||
map.set('privacy', action.status.get('visibility_ex'));
|
||||
map.set('reply_to_limited', action.status.get('limited_scope') === 'reply');
|
||||
map.set('limited_scope', null);
|
||||
map.set('media_attachments', action.status.get('media_attachments').map((media) => media.set('unattached', true)));
|
||||
map.set('focusDate', new Date());
|
||||
|
@ -583,8 +599,9 @@ export default function compose(state = initialState, action) {
|
|||
if (action.status.get('visibility_ex') !== 'limited') {
|
||||
map.set('privacy', action.status.get('visibility_ex'));
|
||||
} else {
|
||||
map.set('privacy', action.status.get('limited_scope') === 'mutual' ? 'mutual' : 'circle');
|
||||
map.set('privacy', action.status.get('limited_scope') || 'circle');
|
||||
}
|
||||
map.set('reply_to_limited', action.status.get('limited_scope') === 'reply');
|
||||
map.set('limited_scope', action.status.get('limited_scope'));
|
||||
map.set('media_attachments', action.status.get('media_attachments'));
|
||||
map.set('focusDate', new Date());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue