You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
356 B
TypeScript
18 lines
356 B
TypeScript
import { toNumber } from 'lodash';
|
|
import { EnvelopePlus } from './types';
|
|
|
|
export function getEnvelopeId(envelope: EnvelopePlus) {
|
|
if (envelope.source) {
|
|
return `${envelope.source} ${toNumber(envelope.timestamp)} (${
|
|
envelope.id
|
|
})`;
|
|
}
|
|
|
|
return envelope.id;
|
|
}
|
|
|
|
export enum ConversationType {
|
|
GROUP = 'group',
|
|
PRIVATE = 'private',
|
|
}
|