This commit is contained in:
Matthias Hochmeister
2026-03-13 21:33:18 +01:00
parent b3266afbf8
commit 7245cd577e
2 changed files with 118 additions and 121 deletions

View File

@@ -141,6 +141,7 @@ interface NextcloudChatMessage {
messageParameters: Record<string, any>;
reactions: Record<string, any>;
reactionsSelf: string[];
parent?: NextcloudChatMessage;
}
async function getAllConversations(loginName: string, appPassword: string): Promise<NextcloudConversation[]> {
@@ -259,6 +260,20 @@ async function getMessages(token: string, loginName: string, appPassword: string
messageParameters: m.messageParameters ?? {},
reactions: m.reactions ?? {},
reactionsSelf: m.reactionsSelf ?? [],
...(m.parent ? { parent: {
id: m.parent.id,
token: m.parent.token,
actorType: m.parent.actorType,
actorId: m.parent.actorId,
actorDisplayName: m.parent.actorDisplayName,
message: m.parent.message,
timestamp: m.parent.timestamp,
messageType: m.parent.messageType ?? '',
systemMessage: m.parent.systemMessage ?? '',
messageParameters: m.parent.messageParameters ?? {},
reactions: m.parent.reactions ?? {},
reactionsSelf: m.parent.reactionsSelf ?? [],
}} : {}),
}));
} catch (error) {
if (axios.isAxiosError(error) && error.response?.status === 401) {