Fix quote
This commit is contained in:
parent
fad04765d4
commit
edc67d424b
|
@ -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,
|
||||
|
|
|
@ -80,6 +80,7 @@ export default class Thread extends Model {
|
|||
|
||||
asPlain() {
|
||||
return {
|
||||
id: this.id,
|
||||
msg: this.msg,
|
||||
t: this.t,
|
||||
ts: this.ts,
|
||||
|
|
|
@ -80,6 +80,7 @@ export default class ThreadMessage extends Model {
|
|||
|
||||
asPlain() {
|
||||
return {
|
||||
id: this.id,
|
||||
msg: this.msg,
|
||||
t: this.t,
|
||||
ts: this.ts,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue