l-min-components 1.6.1231 → 1.6.1232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -770,7 +770,7 @@ const useMessageKit = (/*affiliatesActive*/) => {
|
|
|
770
770
|
if (selectedAccount.type.toLowerCase() === "enterprise") {
|
|
771
771
|
response = await request({
|
|
772
772
|
url: `/notify/v1/enterprise/rooms/${roomId}/change_pin_status/`,
|
|
773
|
-
method: "
|
|
773
|
+
method: "patch",
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
776
|
if (
|
|
@@ -781,7 +781,7 @@ const useMessageKit = (/*affiliatesActive*/) => {
|
|
|
781
781
|
) {
|
|
782
782
|
response = await request({
|
|
783
783
|
url: `/notify/v1/instructor/${affiliateAccount}/rooms/${roomId}/change_pin_status/`,
|
|
784
|
-
method: "
|
|
784
|
+
method: "patch",
|
|
785
785
|
});
|
|
786
786
|
} // incomplete
|
|
787
787
|
|
|
@@ -791,17 +791,25 @@ const useMessageKit = (/*affiliatesActive*/) => {
|
|
|
791
791
|
getMessageRoomsByCourses(null, true);
|
|
792
792
|
return;
|
|
793
793
|
}
|
|
794
|
-
const isPinned = response.data.detail === "True";
|
|
794
|
+
// const isPinned = response.data.detail === "True";
|
|
795
795
|
// The optimistic update should ideally handle the UI change,
|
|
796
796
|
// so no further state update might be needed here based on the response.
|
|
797
797
|
// However, you could add a check to ensure the optimistic update matches the server response.
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
+
const deleteRoom = async (roomId) => {
|
|
801
|
+
let response;
|
|
802
|
+
if (selectedAccount.type.toLowerCase() === "enterprise") {
|
|
803
|
+
response = await request({
|
|
804
|
+
url: ``,
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
};
|
|
800
808
|
// Initial data fetch effect
|
|
801
809
|
useEffect(() => {
|
|
802
810
|
(async () => {
|
|
803
811
|
await getMessageRoomsByCourses();
|
|
804
|
-
|
|
812
|
+
await pinRoom("5be9b48281ac4c2885d3b719654ed59d");
|
|
805
813
|
// Example: Fetch initial chat for a specific room if needed on load
|
|
806
814
|
// await getIndividualChats(null, "5be9b48281ac4c2885d3b719654ed59d");
|
|
807
815
|
// await readRoomMessages({
|