diff --git a/CHANGELOG.md b/CHANGELOG.md index f22ae2db5..b25f45491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# 4.1.1 + +## Affected components: +- Processor (non-breaking changes) +- GraphQL server (non-breaking changes) + +## Bug Fixes: +- Fixed video relevance calculation algorithm by: + - Ignoring `publishedBeforeJoystream` date if it's in the future, + - Fixing a bug with Joystream/YT creation weight formula, + - Introduced an age limit of 365 days to prevent negative relevance score +- Fixed ineffective `videoRelevanceManager` calls in GraphQL server due to `videoRelevanceManager` not being turned on. +- Fixed a bug causing both GraphQL server and Processor services to run video relevance and language update loops (which only processor should be running) +- Fixed imports in GraphQl server and Processor by moving shared utilities to root `utils` directory to prevent mix-ups. + + # 4.1.0 ## Affected components: diff --git a/package.json b/package.json index 7d453b353..df5f4af1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orion", - "version": "4.1.0", + "version": "4.1.1", "engines": { "node": ">=16" }, diff --git a/src/mappings/content/commentsAndReactions.ts b/src/mappings/content/commentsAndReactions.ts index 12fbe909a..44c9e16b7 100644 --- a/src/mappings/content/commentsAndReactions.ts +++ b/src/mappings/content/commentsAndReactions.ts @@ -53,13 +53,9 @@ import { commentCountersManager, videoRelevanceManager, } from '../utils' -import { - getAccountForMember, - getChannelOwnerMemberByChannelId, - memberHandleById, - parseVideoTitle, -} from './utils' +import { getAccountForMember, getChannelOwnerMemberByChannelId, memberHandleById } from './utils' import { addNotification } from '../../utils/notification' +import { parseVideoTitle } from '../../utils/notification/helpers' function parseVideoReaction(reaction: ReactVideo.Reaction): VideoReactionOptions { const protobufReactionToGraphqlReaction = { diff --git a/src/mappings/content/nft.ts b/src/mappings/content/nft.ts index dfeb5f579..80238bc0e 100644 --- a/src/mappings/content/nft.ts +++ b/src/mappings/content/nft.ts @@ -53,9 +53,9 @@ import { notifyBiddersOnAuctionCompletion, notifyChannelFollowers, parseContentActor, - parseVideoTitle, processNft, } from './utils' +import { parseVideoTitle } from '../../utils/notification/helpers' export async function processOpenAuctionStartedEvent({ overlay, diff --git a/src/mappings/content/utils.ts b/src/mappings/content/utils.ts index ea83f2eae..4ebc8e59c 100644 --- a/src/mappings/content/utils.ts +++ b/src/mappings/content/utils.ts @@ -75,6 +75,7 @@ import { criticalError } from '../../utils/misc' import { addNotification } from '../../utils/notification' import { EntityManagerOverlay, Flat } from '../../utils/overlay' import { addNftActivity, addNftHistoryEntry, genericEventFields, invalidMetadata } from '../utils' +import { parseChannelTitle, parseVideoTitle } from '../../utils/notification/helpers' // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AsDecoded = MetaClass extends { create: (props?: infer I) => any } @@ -887,14 +888,6 @@ export function increaseChannelCumulativeRevenue(channel: Flat, amount: channel.cumulativeRevenue = (channel.cumulativeRevenue || 0n) + amount } -export function parseChannelTitle(channel: Flat): string { - return channel.title || FALLBACK_CHANNEL_TITLE -} - -export function parseVideoTitle(video: Flat