wip sharedmsg in client

This commit is contained in:
Reto Brunner 2024-02-24 10:55:42 +01:00
parent 68ba13ca12
commit b67e4699f5
2 changed files with 6 additions and 6 deletions

View file

@ -79,7 +79,7 @@ import {
} from "vue";
import {useStore} from "../js/store";
import {ClientChan, ClientMessage, ClientNetwork, ClientLinkPreview} from "../js/types";
import Msg from "../../server/models/msg";
import {SharedMsg} from "../../shared/types/msg";
type CondensedMessageContainer = {
type: "condensed";
@ -242,7 +242,7 @@ export default defineComponent({
});
const shouldDisplayDateMarker = (
message: Msg | ClientMessage | CondensedMessageContainer,
message: SharedMsg | ClientMessage | CondensedMessageContainer,
id: number
) => {
const previousMessage = condensedMessages.value[id - 1];
@ -270,7 +270,7 @@ export default defineComponent({
return false;
};
const isPreviousSource = (currentMessage: ClientMessage | Msg, id: number) => {
const isPreviousSource = (currentMessage: ClientMessage | SharedMsg, id: number) => {
const previousMessage = condensedMessages.value[id - 1];
return !!(
previousMessage &&

View file

@ -3,7 +3,7 @@ import {defineComponent} from "vue";
import Chan from "../../server/models/chan";
import Network from "../../server/models/network";
import User from "../../server/models/user";
import Message from "../../server/models/msg";
import SharedMessage from "../../shared/types/msg";
import {Mention} from "../../server/client";
import {ClientConfiguration} from "../../server/server";
import {LinkPreview} from "../../server/plugins/irc-events/link";
@ -20,8 +20,8 @@ type ClientUser = User & {
//
};
type ClientMessage = Omit<Message, "users"> & {
time: number;
type ClientMessage = Omit<SharedMessage, "users"> & {
time: Date;
users: string[];
};