Skip to content

Commit 277e8ef

Browse files
committed
Sync: Minor polishes
1 parent 3ea82a6 commit 277e8ef

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

  • src/main/java/io/github/hikingc/matrixsdk/api/events/sync

‎src/main/java/io/github/hikingc/matrixsdk/api/events/sync/Sync.java‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
import io.github.hikingc.matrixsdk.api.events.ClientEvent;
55
import io.github.hikingc.matrixsdk.api.events.EphemeralEvent;
66
import io.github.hikingc.matrixsdk.api.events.matrix.ephemeral.EphemeralPresence;
7+
import io.github.hikingc.matrixsdk.api.identifiers.UserID;
78
import java.util.List;
89
import java.util.Map;
9-
10-
import io.github.hikingc.matrixsdk.services.utils.handlers.HandlerEventDeserializer;
11-
import org.jspecify.annotations.NonNull;
12-
import tools.jackson.databind.annotation.JsonDeserialize;
10+
import org.jspecify.annotations.NullMarked;
1311

1412
/// Represents the response body of a `/sync` request against a Matrix homeserver.
1513
///
@@ -153,19 +151,18 @@ public record LeftRoom(
153151
/// @param content the event content, shape depends on `type`.
154152
/// @param sender the user ID of the event's sender.
155153
/// @param stateKey the state key for this event.
156-
/// @param type the event type, e.g. `m.room.member`.
154+
/// @param type the event type, e.g. `m.room.member`
155+
@NullMarked
157156
public record StrippedStateEvent(
158-
@NonNull @JsonProperty(required = true) Object content,
159-
@NonNull @JsonProperty(required = true) String sender,
160-
@NonNull @JsonProperty(required = true) String stateKey,
161-
@NonNull @JsonProperty(required = true) String type) {}
157+
@JsonProperty(required = true) Object content,
158+
@JsonProperty(required = true) UserID sender,
159+
@JsonProperty(required = true) String stateKey,
160+
@JsonProperty(required = true) String type) {}
162161

163162
/// A batch of room state events.
164163
///
165164
/// @param events the state events.
166-
public record State(
167-
@JsonDeserialize(using = HandlerEventDeserializer.class)
168-
List<ClientEvent<?>> events) {}
165+
public record State(List<ClientEvent<?>> events) {}
169166

170167
/// A paginated batch of timeline events for a room.
171168
///

0 commit comments

Comments
 (0)