Commit Graph

113 Commits

Author SHA1 Message Date
Christian Kußowski c618baae70
refactor: (BREAKING) Make database required 2025-05-16 08:28:08 +02:00
Mohammad Reza Moradi defe47a198
fix: deleting last message is edited 2025-04-10 11:49:35 +02:00
Krille 3f04532ffe
refactor: Remove BasicRoomEvent type
We actually never use the
roomId of this type and the
matrix spec has changed in
a way that the roomId is
never sent there actually. So
it was super easy to just
replace all BasicRoomEvent
with BasicEvent. The roomId
became nullable anyway.
2025-01-09 11:05:01 +01:00
Karthikeyan S 05ee4031bf
chore: BREAKING rename timeCreated to latestEventReceivedTime in Room 2024-12-31 22:16:31 +05:30
Krille f46e76295c
fix: BREAKING! Cache members for encrypted rooms in database
This fixes a huge performance
leak as for every encrypted room
the whole member list is loaded
every time you start the client.
This also changes the default value of `cache` in
this method to if the room is encrypted or not.
For encrypted rooms we always want a complete
member list locally.
2024-11-11 11:58:18 +01:00
Mohammad Reza Moradi 9c32193dff
chore: add require trailing comma lint 2024-11-07 16:13:37 +01:00
Krille 4a754ded5f
fix: (BREAKING) Change power level without changing memory
The problem here is that we
have not created a deep copy
of the power level map. By using .copy() we create a
deep copy now.
2024-10-08 15:10:49 +02:00
Krille 13d756856e
refactor: Migrate to m.marked_unread from Matrix v1.12 2024-10-08 15:03:39 +02:00
Nicolas Werner ec36d9c8fe
fix: Race conditions in tests now that they are running faster 2024-10-07 21:37:42 +02:00
td 4eb18f670f
fix: update last event properly on cancel send
also stores status in db
2024-07-31 14:36:25 +05:30
Krille b962e8288b
feat: Add support for isFederate option for rooms 2024-07-26 13:45:13 +02:00
td 869a7f41a9
fix: lastEvent after edit and redact 2024-07-01 21:31:13 +05:30
Nicolas Werner f13d4e1f45
fix: Request user causing state update loops for apps
This completely redoes the requestUser function.

It now doesn't stop requesting a user forever just because of a network
error. But redundant calls are still deduplicated, however their
parameters are taken into account now.

It also now only calls onUpdate and onRoomState when there is actually
new state. This way apps can just listen to updates to rerender instead
of having to implement the deduplication themselves.

It also now doesn't treat member events without membership as "join"
anymore. And lookup errors don't cause an empty user to get inserted
into the room state.

In general this should still request the profile from the server, if the
displayname is unset in a leave event, but it should also allow the app
to actually settle in the tests.
2024-06-14 12:33:25 +02:00
td 79960d1be3
fix: Do not set messages as state events anymore
We had this as a workaround and forgot to remove it after the database migration to the new way how to store the last message.
2024-05-22 22:22:56 +05:30
td a2e8830df0
chore: expose fake matrix api 2024-04-30 17:42:36 +05:30
td 20a31c1908
feat: famedly calls 2024-04-23 15:52:35 +05:30
Krille e266ef7312
refactor: Switch to MatrixSdkDatabase as suggested database and deprecate other ones 2024-03-22 16:05:08 +01:00
Krille b90b902218
refactor: BREAKING Migrate database to new lastEvent storage method
This changes the way how the last event is stored
for each room. It is now stored next to the
room event itself in the rooms box and no longer
stored like a room state. This way we need to
bump the database version which will cause an
inital sync for the client. Be aware of this when
updating the SDK!
2024-03-18 14:11:15 +01:00
krille-chan 20073ddd49
refactor: Store lastEvent in room object instead of room state 2024-03-18 13:18:36 +01:00
td a60a0cad69
fix: throw EventTooLarge on exceeding max fed PDU 2024-03-14 01:18:10 +05:30
Nicolas Werner cf4a2c7929
fix: some tests fail with the "fixed" membership fetch logic
We need to ensure the room summary and members are set to the expected
values, since otherwise these tests will try to fetch the current
members and then break our expectations.
2024-03-04 19:33:47 +01:00
td aa77812e8e
fix: ignore expired calls rather than killing them 2024-02-14 03:27:09 +05:30
td 6a2f31de39
fix: ignore calls with age older than lifetime
feat: add barebones WebRTCDelegateMock
2023-12-18 21:28:26 +05:30
Krille 9dc2f825a3
refactor: Add loadHeroUsers method
This makes it possible to await loading the
hero users to correctly
calculate displayname and
avatar.
2023-12-14 09:16:52 +01:00
Krille b5b5cfee5e
fix: Convert linebreaks into br tags on markdown parsing
Removes two test cases in the markdown test which do not work anymore.
Reason for this is that just parsing a word inside of $$ word $$
katex is not valid anyway because katex is only made for mathematical
things. So the output is undefined behavior anyway.
2023-09-29 09:24:50 +02:00
Malin Errenst 5943576b1b
refactor: Added type casts to match refactored matrix_api_lite 2023-06-16 12:42:10 +02:00
td 2ebda5e6fc
chore: fix edited last events breaking db 2023-06-01 23:58:47 +05:30
Krille 9c2f026b4d
refactor: Remove unused parameters 2023-05-11 09:24:41 +02:00
td 0c9e129347
fix: clean expired member state events in group calls 2023-02-14 23:08:50 +05:30
td 1219604dc9
fix: hasActiveGroup call now checks all group calls
fix: implement activeGroupCallEvents to get all active group call state events in a room

refactor: move staleCallChecker and expires_Ts stuff to an extension on Room, instead of Voip because it makes much more sense per room rather than on voip, also makes testing easier

fix: populate local groupCalls list on instantiating VOIP()

fix: starting stale call checker is now handled by the sdk itself because clients can forget to do so
2023-02-14 15:02:28 +05:30
td c5d484bb13
feat: add method to generate the matrix.to link 2023-01-20 03:41:43 +05:30
Krille d6c4b530c5 refactor: room displayname calculation
This deprecates the displayname
getter in favor of the new
getLocalizedDisplayname which
gets the default localization
by default so it can be
called without defining localizations. It adds a method
to calculate if a room is an
abandoned DM room where
it is made sure that the room
is actually empty.
2023-01-17 08:51:07 +01:00
Christian Pauly f3287dbb99 fix: PowerLevel calculation regarding to spec 2022-11-21 10:14:28 +01:00
TheOneWithTheBraid ed7913e710 feat: introduce hightlighted room getter
- adds `Room.isUnreadOrInvited` extending `Room.isUnread` to invited rooms

This is some high-level abstraction simplifying computation of unread
room badges / notifications.

Related: https://gitlab.com/groups/famedly/company/-/epics/28

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
2022-10-26 11:51:32 +02:00
cloudwebrtc 62cd4e78fb chore: fix analyzer error. 2022-09-17 00:19:21 +08:00
td f56e0ddb5f
fix: check for m.call permissions in groupCallEnabled 2022-08-01 14:27:10 +05:30
Nicolas Werner 7f55e131f4 Merge branch 'td/enable_group' into 'main'
feat: allow enabling group calls in already created rooms

See merge request famedly/company/frontend/famedlysdk!1084
2022-07-24 19:24:43 +00:00
Jayesh Nirve 29c1241359
chore: add tests for group calls 2022-07-21 23:16:59 +05:30
Christian Pauly 7885281c72 refactor: Use import sorter and ci templates 2022-07-21 15:44:04 +02:00
Christian Pauly 28231936b1 feat: Calc encryption health state and allow key sharing with unknown devices
In order to allow key sharing with
unknown devices (master key has been
verified but this device is not
signed by this master key) the
user should at least be informed.
This makes it possible to set
in the client constructor whether
the app should share keys with
unverified devices or unknown
devices.
2022-07-09 09:39:31 +02:00
Duan Weiwei e2efa3e758 Support group call. 2022-06-13 15:26:25 +00:00
h.carnot 6c2e525a64 fix: remove duplicated read marker 2022-05-16 10:49:57 +02:00
Henri Carnot f23abcd323 feat: get fully read marker 2022-05-02 08:43:54 +00:00
Krille Fear 6f977b7c9d fix: Store sending files in database and fix retrying to send them 2022-04-01 14:26:57 +02:00
Duan Weiwei cac4dc967d chore: Move the call methods in room to the voip class. 2022-03-25 23:51:55 +00:00
Christian Pauly f1d422b89a fix: Dont encrypt reactions
This fixes that server
sends notifications for reactions.
2022-03-15 08:42:53 +01:00
Christian Pauly 01dfdb29fd fix: Has new messages compares ts
This compares the origin server timestamp which might not map
to the real sort order of the timeline. But it is the best
solution for now.
2022-02-15 10:26:17 +01:00
Christian Pauly 68fcee98cb fix: Show reactions as last events and refactor hasNewMessage
Reactions are triggering push
notifications and should therefore
be displayed as last events
in the room list of a client.
The body should just display
the reaction key.
This fixes that rooms with
new reactions can't set to
read.
2022-02-14 15:06:22 +01:00
Nicolas Werner 4a52540006 fix: exception on removed widgets
And widgets without a name.

fixes #267
2022-02-13 23:11:53 +01:00
TheOneWithTheBraid fa6bd12294 feat: implement to get a room's widgets
Please note that this does not implement *modifying* widgets,
as this requires a full implementation of the Matrix Integration Manager
API first. This is to be done later.

Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
2022-02-02 08:38:56 +01:00