upstream: integrar Oasis 1.3.3
Diferencia 1.3.1 -> 1.3.3 del codigo de la APK oficial aplicada a tres bandas encima de la rama: karma en el perfil, salas con directo, fotos selladas, visibilidad de menciones, telefono por stream en Android y las traducciones nuevas. Sin dependencias nuevas. OasisMobile.css sigue siendo el del fork; del oficial solo se traen al final las reglas de las piezas nuevas (karma, directo a pantalla completa, salas en vivo, graphos).
This commit is contained in:
parent
bc64565e9c
commit
948b6460d9
95 changed files with 3613 additions and 1356 deletions
|
|
@ -3,6 +3,12 @@ const { getConfig } = require('../configs/config-manager.js');
|
|||
const categories = require('../backend/opinion_categories');
|
||||
const { buildValidatedTombstoneSet } = require('./tombstone_validator');
|
||||
const { readTyped, CONTENT_TYPES, requestScope } = require('./typed_log');
|
||||
const longText = require('../backend/long_text');
|
||||
const isRootBlogPost = (c) =>
|
||||
!!c && c.type === 'post' && typeof c.text === 'string' &&
|
||||
!c.root && !c.fork && !c.branch && !c.about && !c.target &&
|
||||
c.private !== true && !Array.isArray(c.recps);
|
||||
|
||||
const { buildVoteTally } = require('../backend/vote_tally');
|
||||
const { versionGroups, versionEntry } = require('../backend/dedupe');
|
||||
const logLimit = getConfig().ssbLogStream?.limit || 1000;
|
||||
|
|
@ -24,13 +30,14 @@ module.exports = ({ cooler }) => {
|
|||
|
||||
const validTypes = [
|
||||
'bookmark', 'votes', 'transfer',
|
||||
'feed', 'image', 'audio', 'video', 'document', 'torrent', 'file',
|
||||
'feed', 'post', 'image', 'audio', 'video', 'document', 'torrent', 'file',
|
||||
'industry', 'project', 'report', 'task', 'event', 'shopProduct', 'housing', 'market', 'schoolCourse',
|
||||
'podcast', 'podcastEpisode', 'campaign', 'logisticsRoute'
|
||||
];
|
||||
|
||||
const getPreview = c => {
|
||||
if (c.type === 'bookmark' && c.bookmark) return `🔖 ${c.bookmark}`;
|
||||
if (c.type === 'post') return c.contentWarning || c.text || '';
|
||||
return c.text || c.description || c.title || c.name || '';
|
||||
};
|
||||
|
||||
|
|
@ -83,6 +90,18 @@ module.exports = ({ cooler }) => {
|
|||
if (c.type === 'feed' && !byId.has(key)) {
|
||||
byId.set(key, { key, value: { ...msg.value, content: c, preview: getPreview(c) } });
|
||||
}
|
||||
if (isRootBlogPost(c) && !byId.has(key)) {
|
||||
byId.set(key, { key, value: { ...msg.value, content: c, preview: getPreview(c) } });
|
||||
}
|
||||
}
|
||||
|
||||
const chunkLookup = longText.lookupIn(longText.indexChunks(messages));
|
||||
for (const [key, m] of Array.from(byId.entries())) {
|
||||
const c = m.value?.content;
|
||||
if (c?.type === 'post' && longText.hasChunks(c)) {
|
||||
const content = longText.resolveField(c, 'text', m.value.author, chunkLookup);
|
||||
byId.set(key, { key, value: { ...m.value, content, preview: getPreview(content) } });
|
||||
}
|
||||
}
|
||||
|
||||
const vg = versionGroups(Array.from(byId.values()).map(versionEntry));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue