Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

[OneBot] Fix ForwardEntity cannot be serialized #1447

[OneBot] Fix ForwardEntity cannot be serialized

[OneBot] Fix ForwardEntity cannot be serialized #1447

Triggered via pull request May 6, 2025 17:40
Status Success
Total duration 55s
Artifacts

Lagrange.OneBot-build.yml

on: pull_request
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

140 warnings
build (osx-x64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (osx-x64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (osx-x64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (win-x86): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (win-x86): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (win-x86): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (osx-arm64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (osx-arm64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (osx-arm64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-x64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-x64): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-x64): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L132
Dereference of a possibly null reference.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L127
The type 'Lagrange.OneBot.Database.MessageRecord?' cannot be used as type parameter 'T' in the generic type or method 'Realm.Add<T>(T, bool)'. Nullability of type argument 'Lagrange.OneBot.Database.MessageRecord?' doesn't match constraint type 'Realms.IRealmObject'.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L126
Converting null literal or possible null value to non-nullable type.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L105
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.
build (linux-arm): Lagrange.OneBot/Message/Entity/ReplySegment.cs#L27
Possible null reference return.
build (linux-arm): Lagrange.OneBot/Message/MessageService.cs#L69
Possible null reference argument for parameter 'obj' in 'MessageRecord Realm.Add<MessageRecord>(MessageRecord obj, bool update = false)'.