Get Stories (#3294)
* Get all broadcast * fixed return msgs * feat: add usage example * Update src/structures/Broadcast.js Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com> --------- Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
289b354285
commit
5b0e139ad4
1 changed files with 125 additions and 2 deletions
|
|
@ -1013,5 +1013,16 @@ exports.LoadUtils = () => {
|
|||
const response = await window.Store.pinUnpinMsg(message, action, duration);
|
||||
return response.messageSendResult === 'OK';
|
||||
};
|
||||
|
||||
window.WWebJS.getStatusModel = status => {
|
||||
let res = status.serialize();
|
||||
delete res._msgs;
|
||||
res.msgs = status._msgs.map(msg => window.WWebJS.getMessageModel(msg));
|
||||
return res;
|
||||
};
|
||||
|
||||
window.WWebJS.getAllStatuses = () => {
|
||||
const statuses = window.Store.Status.getModelsArray();
|
||||
return statuses.map(status => window.WWebJS.getStatusModel(status));
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue