Commit Graph

25 Commits

Author SHA1 Message Date
azudin d196ead378 Remove predefinedLabels (#770)
* Remove predefinedLabels

If the user doesn't delete the label from the WA business, it's not a problem.

but it will be a problem when the user deletes the default label, it remains in store but doesn't exist in WA

* fix linting

* fix trailing

* Update chats.ts

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2024-05-15 18:38:42 +03:00
allburov 17ce9df557 Make "logger" optional (#772) 2024-05-15 18:33:22 +03:00
Rajeh Taher 6fe7401337 Update make-in-memory-store.ts (#755)
* Update make-in-memory-store.ts

* fix logger error (#754)

* Update make-in-memory-store.ts

* Update make-in-memory-store.ts

* fix linting

* will we ever fix linting?

* final change

* test

* simplified

* final fix

* comments

* linting
2024-05-06 17:41:43 +03:00
Codeboss 3b87d74f04 Fix pfp change notification (#323)
* Crash if chat is already deleted

* Crash if chat is already deleted (#321) (#322)

* Update messages-recv.ts

* Update make-in-memory-store.ts

* Update messages-recv.ts

* Update make-in-memory-store.ts

* Fix store errors

* Fix hash issue

* Fix eslint

* Update messages-recv.ts

* Update messages-recv.ts

* ESLint final

* no more eslint errors!
2024-04-28 13:44:53 +03:00
azudin 4573abefa4 Fixed predefined label id 2023-10-03 10:27:09 +08:00
Codeboss 30b96c528b Crash if chat is already deleted (#321) 2023-08-10 02:34:33 +03:00
dudagervasio aa9872b039 fix: Fixed In Memory Store: contacts.upsert handle (#144) 2023-06-15 21:45:24 -03:00
aqulzz 6ed9298d96 fix: cannot find module "@adiwajshing/keyed-db" (#124) 2023-06-12 10:08:10 -03:00
Rajeh Taher 8b4b14d1de Merge pull request #69 from rawars/master
Label support
2023-05-18 23:03:09 +03:00
dudagervasio 7b4abcdb23 fix: In memory store: normalize user when asserting message list to update messages (#49)
* normalize user when asserting message list to update messages

* in memory

* update verifies status

* code style improved
2023-05-18 09:04:19 -03:00
Rafael Garcia 3ac29e131d Slint fixes applied 2023-05-15 09:41:33 -05:00
Rafael Garcia ce019dcf0f feat(store/labels): add ability to store and query labels 2023-05-14 12:50:45 -05:00
Adhiraj Singh d0330d1863 refactor!: cleaner message history sync
This is a breaking change,
1. three events (chats.set, contacts.set, messages.set) are now just one `messaging-history.set` event
2. no need to debounce for app state sync
3. added a new "conditional" chat update to allow for correct app state sync despite not having the chat available on hand
2022-09-29 16:32:57 +05:30
Adhiraj Singh e08dd10198 refactor!: use proto.Conversation's own chat mutation fields instead of baileys added 2022-09-29 11:06:09 +05:30
Adhiraj Singh e7f6838fa4 chore: remove legacy code 2022-09-19 14:59:35 +05:30
fadiinho 9e096c731c feat: add reaction update to the store 2022-07-27 10:07:51 +05:30
Adhiraj Singh 40a1e268aa feat: add "strictNullChecks" 2022-07-09 10:20:07 +05:30
Cesar Cejudo 54a448b2a8 Fix in-memory-store contacts (#1420)
fix issue where fromJSON loads contacts from the wrong variable
2022-03-27 20:36:28 +05:30
Adhiraj Singh de7d1002a9 lint: stricter linting rules 2022-03-01 16:32:14 +05:30
Anshu S bbea04e5bc Fix Issue #1209 (#1210) 2022-02-07 18:20:48 +05:30
Adhiraj Singh 08cd253e90 feat: add 'updateMessageWithReceipt' utility 2022-01-22 12:05:38 +05:30
Adhiraj Singh 92587bd46a refactor: use the proto UserReceipt instead of custom MessageInfo 2022-01-22 00:27:00 +05:30
Adhiraj Singh 284c7e7812 fix: do not mutate update object reference 2022-01-20 12:28:56 +05:30
Adhiraj Singh 1fb52de958 docs: update readme about store 2022-01-19 22:38:04 +05:30
Adhiraj Singh fb66733b61 feat: implement in memory store
1. the store works as a temporary store for connection data such as chats, messages & contacts
2. the store is primarily meant to illustrate the usage of the event emitter as a way to construct the state of the connection. This will likely be very inefficient to perform well at scale
3. the store is meant to be a quick way to have some visibility of data while testing
4. the store works for both legacy & MD connections
2022-01-19 21:35:59 +05:30