commit
37e9a16227
6 changed files with 28 additions and 11 deletions
|
@ -96,6 +96,9 @@ RUN \
|
||||||
# Set /opt/mastodon as working directory
|
# Set /opt/mastodon as working directory
|
||||||
WORKDIR /opt/mastodon
|
WORKDIR /opt/mastodon
|
||||||
|
|
||||||
|
# Add backport repository for some specific packages where we need the latest version
|
||||||
|
RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list
|
||||||
|
|
||||||
# hadolint ignore=DL3008,DL3005
|
# hadolint ignore=DL3008,DL3005
|
||||||
RUN \
|
RUN \
|
||||||
# Mount Apt cache and lib directories from Docker buildx caches
|
# Mount Apt cache and lib directories from Docker buildx caches
|
||||||
|
@ -165,7 +168,7 @@ RUN \
|
||||||
libexif-dev \
|
libexif-dev \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libgirepository1.0-dev \
|
libgirepository1.0-dev \
|
||||||
libheif-dev \
|
libheif-dev/bookworm-backports \
|
||||||
libimagequant-dev \
|
libimagequant-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
liblcms2-dev \
|
liblcms2-dev \
|
||||||
|
@ -348,7 +351,7 @@ RUN \
|
||||||
# libvips components
|
# libvips components
|
||||||
libcgif0 \
|
libcgif0 \
|
||||||
libexif12 \
|
libexif12 \
|
||||||
libheif1 \
|
libheif1/bookworm-backports \
|
||||||
libimagequant0 \
|
libimagequant0 \
|
||||||
libjpeg62-turbo \
|
libjpeg62-turbo \
|
||||||
liblcms2-2 \
|
liblcms2-2 \
|
||||||
|
|
|
@ -237,7 +237,7 @@ export const DetailedStatus: React.FC<{
|
||||||
<Card
|
<Card
|
||||||
sensitive={status.get('sensitive') && !status.get('spoiler_text')}
|
sensitive={status.get('sensitive') && !status.get('spoiler_text')}
|
||||||
onOpenMedia={onOpenMedia}
|
onOpenMedia={onOpenMedia}
|
||||||
card={status.get('card', null)}
|
card={status.get('card')}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,12 +342,26 @@ const expiresInFromExpiresAt = expires_at => {
|
||||||
|
|
||||||
const mergeLocalHashtagResults = (suggestions, prefix, tagHistory) => {
|
const mergeLocalHashtagResults = (suggestions, prefix, tagHistory) => {
|
||||||
prefix = prefix.toLowerCase();
|
prefix = prefix.toLowerCase();
|
||||||
|
|
||||||
if (suggestions.length < 4) {
|
if (suggestions.length < 4) {
|
||||||
const localTags = tagHistory.filter(tag => tag.toLowerCase().startsWith(prefix) && !suggestions.some(suggestion => suggestion.type === 'hashtag' && suggestion.name.toLowerCase() === tag.toLowerCase()));
|
const localTags = tagHistory.filter(tag => tag.toLowerCase().startsWith(prefix) && !suggestions.some(suggestion => suggestion.type === 'hashtag' && suggestion.name.toLowerCase() === tag.toLowerCase()));
|
||||||
return suggestions.concat(localTags.slice(0, 4 - suggestions.length).toJS().map(tag => ({ type: 'hashtag', name: tag })));
|
suggestions = suggestions.concat(localTags.slice(0, 4 - suggestions.length).toJS().map(tag => ({ type: 'hashtag', name: tag })));
|
||||||
} else {
|
|
||||||
return suggestions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prefer capitalization from personal history, unless personal history is all lower-case
|
||||||
|
const fixSuggestionCapitalization = (suggestion) => {
|
||||||
|
if (suggestion.type !== 'hashtag')
|
||||||
|
return suggestion;
|
||||||
|
|
||||||
|
const tagFromHistory = tagHistory.find((tag) => tag.localeCompare(suggestion.name, undefined, { sensitivity: 'accent' }) === 0);
|
||||||
|
|
||||||
|
if (!tagFromHistory || tagFromHistory.toLowerCase() === tagFromHistory)
|
||||||
|
return suggestion;
|
||||||
|
|
||||||
|
return { ...suggestion, name: tagFromHistory };
|
||||||
|
};
|
||||||
|
|
||||||
|
return suggestions.map(fixSuggestionCapitalization);
|
||||||
};
|
};
|
||||||
|
|
||||||
const normalizeSuggestions = (state, { accounts, emojis, tags, token }) => {
|
const normalizeSuggestions = (state, { accounts, emojis, tags, token }) => {
|
||||||
|
|
|
@ -59,7 +59,7 @@ services:
|
||||||
web:
|
web:
|
||||||
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
|
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
|
||||||
build: .
|
build: .
|
||||||
image: kmyblue:17.1
|
image: kmyblue:17.2
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bundle exec puma -C config/puma.rb
|
command: bundle exec puma -C config/puma.rb
|
||||||
|
@ -83,7 +83,7 @@ services:
|
||||||
build:
|
build:
|
||||||
dockerfile: ./streaming/Dockerfile
|
dockerfile: ./streaming/Dockerfile
|
||||||
context: .
|
context: .
|
||||||
image: kmyblue-streaming:17.1
|
image: kmyblue-streaming:17.2
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: node ./streaming/index.js
|
command: node ./streaming/index.js
|
||||||
|
@ -101,7 +101,7 @@ services:
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
build: .
|
build: .
|
||||||
image: kmyblue:17.1
|
image: kmyblue:17.2
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
|
|
|
@ -13,7 +13,7 @@ module Mastodon
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_minor
|
def kmyblue_minor
|
||||||
1
|
2
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_flag
|
def kmyblue_flag
|
||||||
|
|
|
@ -689,7 +689,7 @@ const startServer = async () => {
|
||||||
// filtering of statuses:
|
// filtering of statuses:
|
||||||
|
|
||||||
// Filter based on language:
|
// Filter based on language:
|
||||||
if (Array.isArray(req.chosenLanguages) && payload.language !== null && req.chosenLanguages.indexOf(payload.language) === -1) {
|
if (Array.isArray(req.chosenLanguages) && req.chosenLanguages.indexOf(payload.language) === -1) {
|
||||||
log.debug(`Message ${payload.id} filtered by language (${payload.language})`);
|
log.debug(`Message ${payload.id} filtered by language (${payload.language})`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue