Fix quote

This commit is contained in:
Diego Mello 2022-11-29 13:26:58 -03:00
parent fad04765d4
commit edc67d424b
4 changed files with 7 additions and 4 deletions

View File

@ -88,6 +88,8 @@ export default class Message extends Model {
asPlain() {
return {
id: this.id,
rid: this.subscription.id,
msg: this.msg,
t: this.t,
ts: this.ts,

View File

@ -80,6 +80,7 @@ export default class Thread extends Model {
asPlain() {
return {
id: this.id,
msg: this.msg,
t: this.t,
ts: this.ts,

View File

@ -80,6 +80,7 @@ export default class ThreadMessage extends Model {
asPlain() {
return {
id: this.id,
msg: this.msg,
t: this.t,
ts: this.ts,

View File

@ -1,16 +1,15 @@
import log from './helpers/log';
import { TMessageModel, TSubscriptionModel } from '../../definitions';
import { IMessage, TSubscriptionModel } from '../../definitions';
import { store } from '../store/auxStore';
import { isGroupChat } from './helpers';
import { getRoom } from './getRoom';
type TRoomType = 'p' | 'c' | 'd';
export async function getPermalinkMessage(message: TMessageModel): Promise<string | null> {
if (!message.subscription) return null;
export async function getPermalinkMessage(message: IMessage): Promise<string | null> {
let room: TSubscriptionModel;
try {
room = await getRoom(message.subscription.id);
room = await getRoom(message.rid);
} catch (e) {
log(e);
return null;