@xuda.io/account_module 1.2.900 → 1.2.902
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/index.mjs +15 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1793,7 +1793,7 @@ export const unfriend_contact = async function (req) {
|
|
|
1793
1793
|
};
|
|
1794
1794
|
|
|
1795
1795
|
export const pin_contact = async function (req) {
|
|
1796
|
-
const { contact_id } = req;
|
|
1796
|
+
const { uid, contact_id } = req;
|
|
1797
1797
|
try {
|
|
1798
1798
|
const contact_ret = await db_module.get_couch_doc('xuda_contacts', contact_id);
|
|
1799
1799
|
if (contact_ret.code < 0) {
|
|
@@ -1804,6 +1804,20 @@ export const pin_contact = async function (req) {
|
|
|
1804
1804
|
|
|
1805
1805
|
const contact_save_ret = await db_module.save_couch_doc('xuda_contacts', contact_doc);
|
|
1806
1806
|
|
|
1807
|
+
global[`_controller_module_ch`].sendToQueue(
|
|
1808
|
+
'ws_dashboard_module',
|
|
1809
|
+
Buffer.from(
|
|
1810
|
+
JSON.stringify({
|
|
1811
|
+
method: 'emit_message_to_dashboard',
|
|
1812
|
+
data: {
|
|
1813
|
+
service: 'contact_pinned',
|
|
1814
|
+
to: [uid],
|
|
1815
|
+
data: contact_id,
|
|
1816
|
+
},
|
|
1817
|
+
}),
|
|
1818
|
+
),
|
|
1819
|
+
);
|
|
1820
|
+
|
|
1807
1821
|
return contact_save_ret;
|
|
1808
1822
|
} catch (err) {
|
|
1809
1823
|
return {
|