|
|
|
@ -70,11 +70,13 @@ export default definePlugin({
|
|
|
|
|
if (data.activity?.assets?.large_image) data.activity.assets.large_image = await lookupAsset(data.activity.application_id, data.activity.assets.large_image);
|
|
|
|
|
if (data.activity?.assets?.small_image) data.activity.assets.small_image = await lookupAsset(data.activity.application_id, data.activity.assets.small_image);
|
|
|
|
|
|
|
|
|
|
const appId = data.activity.application_id;
|
|
|
|
|
if (!apps[appId]) apps[appId] = await lookupApp(appId);
|
|
|
|
|
if (data.activity) {
|
|
|
|
|
const appId = data.activity.application_id;
|
|
|
|
|
apps[appId] ||= await lookupApp(appId);
|
|
|
|
|
|
|
|
|
|
const app = apps[appId];
|
|
|
|
|
if (!data.activity.name) data.activity.name = app.name;
|
|
|
|
|
const app = apps[appId];
|
|
|
|
|
data.activity.name ||= app.name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluxDispatcher.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", ...data });
|
|
|
|
|
};
|
|
|
|
|