|
4 | 4 | import io.github.hikingc.matrixsdk.api.events.ClientEvent; |
5 | 5 | import io.github.hikingc.matrixsdk.api.events.EphemeralEvent; |
6 | 6 | import io.github.hikingc.matrixsdk.api.events.matrix.ephemeral.EphemeralPresence; |
| 7 | +import io.github.hikingc.matrixsdk.api.identifiers.UserID; |
7 | 8 | import java.util.List; |
8 | 9 | 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; |
13 | 11 |
|
14 | 12 | /// Represents the response body of a `/sync` request against a Matrix homeserver. |
15 | 13 | /// |
@@ -153,19 +151,18 @@ public record LeftRoom( |
153 | 151 | /// @param content the event content, shape depends on `type`. |
154 | 152 | /// @param sender the user ID of the event's sender. |
155 | 153 | /// @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 |
157 | 156 | 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) {} |
162 | 161 |
|
163 | 162 | /// A batch of room state events. |
164 | 163 | /// |
165 | 164 | /// @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) {} |
169 | 166 |
|
170 | 167 | /// A paginated batch of timeline events for a room. |
171 | 168 | /// |
|
0 commit comments