-
{highlightMentions(m.text, memberNames)}
+
+
+ {m.text ? highlightMentions(m.text, memberNames) : null}
+ {m.attachment ?
: null}
+
+ {canReact ? (
+
+
+ {pickerFor === m.id ? (
+
+ {REACTION_EMOJIS.map((e) => (
+
+ ))}
+
+ ) : null}
+
+ ) : null}
+
{m.reactions && m.reactions.length > 0 ? (
{m.reactions.map((r) => (
-
+
+
))}
) : null}
@@ -104,20 +176,38 @@ export function Thread({ threadId }: { threadId: string | null }) {
))}
) : null}
-
{
- setDraft(e.target.value);
- sendTyping();
- }}
- onKeyDown={onKeyDown}
- />
-
+ {staged ? (
+
+ π {staged.name}
+
+
+ ) : null}
+
+ {canUpload ? (
+ <>
+
+
+ >
+ ) : null}
+ {
+ setDraft(e.target.value);
+ sendTyping();
+ }}
+ onKeyDown={onKeyDown}
+ />
+
+
);
diff --git a/packages/iios-messaging-ui/src/hooks/use-messages.ts b/packages/iios-messaging-ui/src/hooks/use-messages.ts
index d50954d..ccb49a6 100644
--- a/packages/iios-messaging-ui/src/hooks/use-messages.ts
+++ b/packages/iios-messaging-ui/src/hooks/use-messages.ts
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useAdapter } from '../provider';
import { isOwnMessage } from '../types';
-import type { Message, SendOpts } from '../types';
+import type { Attachment, Message, SendOpts } from '../types';
const TYPING_TTL_MS = 3500;
@@ -15,6 +15,7 @@ export interface MessagesState {
error: string | null;
send: (content: string, opts?: SendOpts) => Promise