Don't compact trksegs if you don't own them
This commit is contained in:
parent
c1f1c8afb0
commit
bb763435ef
|
@ -61,6 +61,7 @@ export const watchDbLegacy = async () => {
|
|||
const newState = {
|
||||
...state(),
|
||||
dbName: status()?.dbInfo?.db_name,
|
||||
userId: dbUrlToUserId(status()?.remoteDbInfo?.host),
|
||||
localUpdateSeq: status()?.dbInfo?.update_seq,
|
||||
remoteUrl: status()?.remoteDbInfo?.host,
|
||||
sync: syncState(),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { cloneDeep } from 'lodash';
|
||||
import { state } from '../db-admin/health-legacy';
|
||||
import getUri, { intToTrkptId } from '../lib/ids';
|
||||
import { appendToArray } from './gpx';
|
||||
import { getFamily, put } from './lib';
|
||||
|
@ -43,7 +44,7 @@ export const getTrksegDocs: ({
|
|||
export const getTrkseg = async (params: any) => {
|
||||
const { id } = params;
|
||||
const { docs, trkseg } = await getTrksegDocs(params);
|
||||
if (docs.rows.length > 1) {
|
||||
if (docs.rows.length > 1 && docs.rows[0].doc.origin === state().userId) {
|
||||
// console.log({
|
||||
// caller: 'getTrkseg compactRteOrTrksegDebounced required',
|
||||
// id,
|
||||
|
|
Loading…
Reference in New Issue