diff options
39 files changed, 1 insertions, 51 deletions
diff --git a/LibMatrix/EventTypes/Common/MjolnirShortcodeEventContent.cs b/LibMatrix/EventTypes/Common/MjolnirShortcodeEventContent.cs index 9067351..374ddd4 100644 --- a/LibMatrix/EventTypes/Common/MjolnirShortcodeEventContent.cs +++ b/LibMatrix/EventTypes/Common/MjolnirShortcodeEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Common; diff --git a/LibMatrix/EventTypes/Common/RoomEmotesEventContent.cs b/LibMatrix/EventTypes/Common/RoomEmotesEventContent.cs index abf936c..2e824ca 100644 --- a/LibMatrix/EventTypes/Common/RoomEmotesEventContent.cs +++ b/LibMatrix/EventTypes/Common/RoomEmotesEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Common; diff --git a/LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs b/LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs index b12da5b..51cfdef 100644 --- a/LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs +++ b/LibMatrix/EventTypes/Spec/Ephemeral/PresenceStateEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs b/LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs index 01cfacf..0ff2cee 100644 --- a/LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs +++ b/LibMatrix/EventTypes/Spec/Ephemeral/RoomTypingEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/RoomMessageEventContent.cs b/LibMatrix/EventTypes/Spec/RoomMessageEventContent.cs index f8ee58b..4118785 100644 --- a/LibMatrix/EventTypes/Spec/RoomMessageEventContent.cs +++ b/LibMatrix/EventTypes/Spec/RoomMessageEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec; diff --git a/LibMatrix/EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs b/LibMatrix/EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs index fde02c1..74bbb71 100644 --- a/LibMatrix/EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAliasEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAliasEventContent.cs index 5b0e914..b7e54ad 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAliasEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAliasEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs index 601d014..4cca32c 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomAvatarEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCanonicalAliasEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCanonicalAliasEventContent.cs index 046222e..b677507 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCanonicalAliasEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCanonicalAliasEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCreateEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCreateEventContent.cs index c5bf14e..275203c 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCreateEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomCreateEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomEncryptionEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomEncryptionEventContent.cs index 6ffa4c5..774b1eb 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomEncryptionEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomEncryptionEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomGuestAccessEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomGuestAccessEventContent.cs index 2bb4d36..abc9ffe 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomGuestAccessEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomGuestAccessEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomHistoryVisibilityEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomHistoryVisibilityEventContent.cs index a32fed2..578a866 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomHistoryVisibilityEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomHistoryVisibilityEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomJoinRulesEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomJoinRulesEventContent.cs index 2c2a91b..1f673fb 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomJoinRulesEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomJoinRulesEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomMemberEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomMemberEventContent.cs index 52cb293..bda84a4 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomMemberEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomMemberEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomNameEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomNameEventContent.cs index 7cb881a..e475012 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomNameEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomNameEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPinnedEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPinnedEventContent.cs index eb02cc7..ba73a5e 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPinnedEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPinnedEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPowerLevelEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPowerLevelEventContent.cs index 2ae9593..7f37271 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPowerLevelEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomPowerLevelEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomServerACLEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomServerACLEventContent.cs index 5c5627c..1a444fb 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomServerACLEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomServerACLEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomTopicEventContent.cs b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomTopicEventContent.cs index 52c7e42..5623865 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomTopicEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomInfo/RoomTopicEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/Space/SpaceChildEventContent.cs b/LibMatrix/EventTypes/Spec/State/Space/SpaceChildEventContent.cs index 0a897dc..c52557c 100644 --- a/LibMatrix/EventTypes/Spec/State/Space/SpaceChildEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/Space/SpaceChildEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/EventTypes/Spec/State/Space/SpaceParentEventContent.cs b/LibMatrix/EventTypes/Spec/State/Space/SpaceParentEventContent.cs index 0ffa193..49f2901 100644 --- a/LibMatrix/EventTypes/Spec/State/Space/SpaceParentEventContent.cs +++ b/LibMatrix/EventTypes/Spec/State/Space/SpaceParentEventContent.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix.EventTypes.Spec.State; diff --git a/LibMatrix/Extensions/JsonElementExtensions.cs b/LibMatrix/Extensions/JsonElementExtensions.cs index f39f300..8c3884e 100644 --- a/LibMatrix/Extensions/JsonElementExtensions.cs +++ b/LibMatrix/Extensions/JsonElementExtensions.cs @@ -2,7 +2,6 @@ using System.Reflection; using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; -using LibMatrix.Responses; namespace LibMatrix.Extensions; diff --git a/LibMatrix/Filters/SyncFilter.cs b/LibMatrix/Filters/SyncFilter.cs index e3e8164..b05f6b4 100644 --- a/LibMatrix/Filters/SyncFilter.cs +++ b/LibMatrix/Filters/SyncFilter.cs @@ -1,4 +1,3 @@ -using System.Reflection.Metadata; using System.Text.Json.Serialization; namespace LibMatrix.Filters; diff --git a/LibMatrix/Helpers/SyncHelper.cs b/LibMatrix/Helpers/SyncHelper.cs index 06ae3fe..a793d76 100644 --- a/LibMatrix/Helpers/SyncHelper.cs +++ b/LibMatrix/Helpers/SyncHelper.cs @@ -1,11 +1,8 @@ using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Net.Http.Json; using ArcaneLibs.Extensions; using LibMatrix.Filters; using LibMatrix.Homeservers; using LibMatrix.Responses; -using LibMatrix.Services; using Microsoft.Extensions.Logging; namespace LibMatrix.Helpers; diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs index d5b0a77..f6c530d 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs @@ -4,8 +4,6 @@ using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; using ArcaneLibs.Extensions; -using LibMatrix.Extensions; -using LibMatrix.Helpers; using LibMatrix.Responses; using LibMatrix.RoomTypes; using LibMatrix.Services; diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverMxApiExtended.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverMxApiExtended.cs index a420d71..494c442 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverMxApiExtended.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverMxApiExtended.cs @@ -1,7 +1,3 @@ -using LibMatrix.Extensions; -using LibMatrix.Helpers; -using LibMatrix.Services; - namespace LibMatrix.Homeservers; public class AuthenticatedHomeserverMxApiExtended(string baseUrl, string accessToken) : AuthenticatedHomeserverGeneric(baseUrl, accessToken); diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverSynapse.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverSynapse.cs index e355d2d..6d60dd7 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverSynapse.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverSynapse.cs @@ -1,7 +1,6 @@ using ArcaneLibs.Extensions; using LibMatrix.Filters; using LibMatrix.Responses.Admin; -using LibMatrix.Services; namespace LibMatrix.Homeservers; diff --git a/LibMatrix/Homeservers/RemoteHomeServer.cs b/LibMatrix/Homeservers/RemoteHomeServer.cs index 798349a..e8b0cc8 100644 --- a/LibMatrix/Homeservers/RemoteHomeServer.cs +++ b/LibMatrix/Homeservers/RemoteHomeServer.cs @@ -1,4 +1,3 @@ -using System.Net.Http.Headers; using System.Net.Http.Json; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/LibMatrix/MessagesResponse.cs b/LibMatrix/MessagesResponse.cs index f09d136..f1a220c 100644 --- a/LibMatrix/MessagesResponse.cs +++ b/LibMatrix/MessagesResponse.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Responses; namespace LibMatrix; diff --git a/LibMatrix/Responses/CreateRoomRequest.cs b/LibMatrix/Responses/CreateRoomRequest.cs index 1ad590f..4267094 100644 --- a/LibMatrix/Responses/CreateRoomRequest.cs +++ b/LibMatrix/Responses/CreateRoomRequest.cs @@ -4,7 +4,6 @@ using System.Text.Json.Serialization; using System.Text.RegularExpressions; using LibMatrix.EventTypes; using LibMatrix.EventTypes.Spec.State; -using LibMatrix.Helpers; using LibMatrix.Homeservers; using LibMatrix.Interfaces; diff --git a/LibMatrix/Responses/SyncResponse.cs b/LibMatrix/Responses/SyncResponse.cs index 39cb38f..d3130bb 100644 --- a/LibMatrix/Responses/SyncResponse.cs +++ b/LibMatrix/Responses/SyncResponse.cs @@ -1,5 +1,4 @@ using System.Text.Json.Serialization; -using LibMatrix.Helpers; namespace LibMatrix.Responses; diff --git a/LibMatrix/RoomTypes/GenericRoom.cs b/LibMatrix/RoomTypes/GenericRoom.cs index 75cb5f3..ae41f1e 100644 --- a/LibMatrix/RoomTypes/GenericRoom.cs +++ b/LibMatrix/RoomTypes/GenericRoom.cs @@ -7,8 +7,6 @@ using LibMatrix.EventTypes.Spec.State; using LibMatrix.Extensions; using LibMatrix.Homeservers; using LibMatrix.Interfaces; -using LibMatrix.Responses; -using Microsoft.Extensions.Logging; namespace LibMatrix.RoomTypes; diff --git a/LibMatrix/RoomTypes/SpaceRoom.cs b/LibMatrix/RoomTypes/SpaceRoom.cs index 4a8e247..da9fcf8 100644 --- a/LibMatrix/RoomTypes/SpaceRoom.cs +++ b/LibMatrix/RoomTypes/SpaceRoom.cs @@ -1,6 +1,5 @@ using ArcaneLibs.Extensions; using LibMatrix.Homeservers; -using Microsoft.Extensions.Logging; namespace LibMatrix.RoomTypes; diff --git a/LibMatrix/Services/HomeserverProviderService.cs b/LibMatrix/Services/HomeserverProviderService.cs index 1f3bd37..6659081 100644 --- a/LibMatrix/Services/HomeserverProviderService.cs +++ b/LibMatrix/Services/HomeserverProviderService.cs @@ -1,7 +1,5 @@ -using System.Net.Http.Headers; using System.Net.Http.Json; using ArcaneLibs.Extensions; -using LibMatrix.Extensions; using LibMatrix.Homeservers; using LibMatrix.Responses; using Microsoft.Extensions.Logging; diff --git a/LibMatrix/StateEvent.cs b/LibMatrix/StateEvent.cs index c51fadb..e846811 100644 --- a/LibMatrix/StateEvent.cs +++ b/LibMatrix/StateEvent.cs @@ -2,11 +2,9 @@ using System.Reflection; using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; -using System.Text.Json.Serialization.Metadata; using ArcaneLibs; using ArcaneLibs.Extensions; using LibMatrix.EventTypes; -using LibMatrix.Helpers; using LibMatrix.Interfaces; namespace LibMatrix; diff --git a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs index 16e1444..91ec1e8 100644 --- a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs +++ b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs @@ -1,13 +1,9 @@ using ArcaneLibs; -using ArcaneLibs.Extensions; -using LibMatrix.Helpers; using LibMatrix.Homeservers; using LibMatrix.Services; using LibMatrix.Utilities.Bot.Interfaces; using LibMatrix.Utilities.Bot.Services; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; namespace LibMatrix.Utilities.Bot; diff --git a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs index 97984fd..2d04e37 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs @@ -1,6 +1,5 @@ using LibMatrix.EventTypes.Spec; using LibMatrix.Homeservers; -using LibMatrix.Responses; using LibMatrix.RoomTypes; namespace LibMatrix.Utilities.Bot.Interfaces; diff --git a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs index 0dcf3e3..f56f9c1 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs @@ -81,7 +81,7 @@ public class CommandListenerHostedService : IHostedService { _logger.LogError(e, "Error in command listener!"); } }); - await new SyncHelper(_hs).RunSyncLoopAsync(cancellationToken: cancellationToken); + await new SyncHelper(_hs){Timeout = 2500}.RunSyncLoopAsync(cancellationToken: cancellationToken); } /// <summary>Triggered when the application host is performing a graceful shutdown.</summary> |