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() { asPlain() {
return { return {
id: this.id,
rid: this.subscription.id,
msg: this.msg, msg: this.msg,
t: this.t, t: this.t,
ts: this.ts, ts: this.ts,

View File

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

View File

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

View File

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