diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 47b85b3e11..ad40f689db 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @matrix-org/dendrite-core \ No newline at end of file +* @element-hq/dendrite-core diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md index 084f683bd3..5f9714a5f8 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -6,7 +6,7 @@ about: Suggest an idea for this project **Description:** diff --git a/.github/workflows/dendrite.yml b/.github/workflows/dendrite.yml index d9c883dabb..9c7a1fdc93 100644 --- a/.github/workflows/dendrite.yml +++ b/.github/workflows/dendrite.yml @@ -5,14 +5,14 @@ on: branches: - main paths: - - '**.go' # only execute on changes to go files - - 'go.sum' # or dependency updates - - '.github/workflows/**' # or workflow changes + - "**.go" # only execute on changes to go files + - "go.sum" # or dependency updates + - ".github/workflows/**" # or workflow changes pull_request: paths: - - '**.go' - - 'go.sum' # or dependency updates - - '.github/workflows/**' + - "**.go" + - "go.sum" # or dependency updates + - ".github/workflows/**" release: types: [published] workflow_dispatch: @@ -33,7 +33,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" cache: true - name: Install Node @@ -72,7 +72,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -108,7 +108,7 @@ jobs: - name: Setup go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" - uses: actions/cache@v4 # manually set up caches, as they otherwise clash with different steps using setup-go with cache=true with: @@ -145,7 +145,7 @@ jobs: - name: Setup go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" - uses: actions/cache@v4 with: path: | @@ -178,7 +178,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" - uses: actions/cache@v4 with: path: | @@ -241,7 +241,7 @@ jobs: - name: Setup go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" - name: Set up gotestfmt uses: gotesttools/gotestfmt-action@v2 with: @@ -279,7 +279,7 @@ jobs: - name: Setup go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" cache: true - uses: actions/cache@v4 with: @@ -309,7 +309,7 @@ jobs: - name: Setup go uses: actions/setup-go@v4 with: - go-version-file: 'go.mod' + go-version-file: "go.mod" cache: true - uses: actions/cache@v4 with: @@ -474,7 +474,7 @@ jobs: upgrade_test_direct, sytest, complement, - integration + integration, ] runs-on: ubuntu-latest if: ${{ !cancelled() }} # Run this even if prior jobs were skipped @@ -490,8 +490,8 @@ jobs: packages: write contents: read security-events: write # To upload Trivy sarif files - if: github.repository == 'matrix-org/dendrite' && github.ref_name == 'main' + if: github.repository == 'element-hq/dendrite' && github.ref_name == 'main' needs: [integration-tests-done] - uses: matrix-org/dendrite/.github/workflows/docker.yml@main + uses: element-hq/dendrite/.github/workflows/docker.yml@main secrets: DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c795cd3663..0e10af3fb7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,7 +14,7 @@ on: env: DOCKER_NAMESPACE: matrixdotorg DOCKER_HUB_USER: dendritegithub - GHCR_NAMESPACE: matrix-org + GHCR_NAMESPACE: element-hq PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7 jobs: diff --git a/Dockerfile b/Dockerfile index bf80692131..27e7b39adb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,10 +30,10 @@ FROM alpine:latest RUN apk --update --no-cache add curl LABEL org.opencontainers.image.title="Dendrite" LABEL org.opencontainers.image.description="Next-generation Matrix homeserver written in Go" -LABEL org.opencontainers.image.source="https://github.com/matrix-org/dendrite" -LABEL org.opencontainers.image.licenses="Apache-2.0" -LABEL org.opencontainers.image.documentation="https://matrix-org.github.io/dendrite/" -LABEL org.opencontainers.image.vendor="The Matrix.org Foundation C.I.C." +LABEL org.opencontainers.image.source="https://github.com/element-hq/dendrite" +LABEL org.opencontainers.image.licenses="AGPL-3.0-only OR LicenseRef-Element-Commercial" +LABEL org.opencontainers.image.documentation="https://element-hq.github.io/dendrite/" +LABEL org.opencontainers.image.vendor="New Vector Ltd." COPY --from=build /out/create-account /usr/bin/create-account COPY --from=build /out/generate-config /usr/bin/generate-config @@ -45,4 +45,3 @@ WORKDIR /etc/dendrite ENTRYPOINT ["/usr/bin/dendrite"] EXPOSE 8008 8448 - diff --git a/LICENSE b/LICENSE index f433b1a53f..be3f7b28e5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,177 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/LICENSE-COMMERCIAL b/LICENSE-COMMERCIAL new file mode 100644 index 0000000000..39041ce02d --- /dev/null +++ b/LICENSE-COMMERCIAL @@ -0,0 +1,6 @@ +Licensees holding a valid commercial license with Element may use this +software in accordance with the terms contained in a written agreement +between you and Element. + +To purchase a commercial license please contact our sales team at +licensing@element.io diff --git a/README.md b/README.md index 2bae96fec8..8b53a89991 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Dendrite -[![Build status](https://github.com/matrix-org/dendrite/actions/workflows/dendrite.yml/badge.svg?event=push)](https://github.com/matrix-org/dendrite/actions/workflows/dendrite.yml) [![Dendrite](https://img.shields.io/matrix/dendrite:matrix.org.svg?label=%23dendrite%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite:matrix.org) [![Dendrite Dev](https://img.shields.io/matrix/dendrite-dev:matrix.org.svg?label=%23dendrite-dev%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite-dev:matrix.org) +[![Build status](https://github.com/element-hq/dendrite/actions/workflows/dendrite.yml/badge.svg?event=push)](https://github.com/element-hq/dendrite/actions/workflows/dendrite.yml) [![Dendrite](https://img.shields.io/matrix/dendrite:matrix.org.svg?label=%23dendrite%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite:matrix.org) [![Dendrite Dev](https://img.shields.io/matrix/dendrite-dev:matrix.org.svg?label=%23dendrite-dev%3Amatrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#dendrite-dev:matrix.org) Dendrite is a second-generation Matrix homeserver written in Go. It intends to provide an **efficient**, **reliable** and **scalable** alternative to [Synapse](https://github.com/matrix-org/synapse): @@ -47,7 +47,7 @@ For a usable federating Dendrite deployment, you will also need: Also recommended are: - A PostgreSQL database engine, which will perform better than SQLite with many users and/or larger rooms -- A reverse proxy server, such as nginx, configured [like this sample](https://github.com/matrix-org/dendrite/blob/main/docs/nginx/dendrite-sample.conf) +- A reverse proxy server, such as nginx, configured [like this sample](https://github.com/element-hq/dendrite/blob/main/docs/nginx/dendrite-sample.conf) The [Federation Tester](https://federationtester.matrix.org) can be used to verify your deployment. @@ -58,7 +58,7 @@ If you wish to build a fully-federating Dendrite instance, see [the Installation The following instructions are enough to get Dendrite started as a non-federating test deployment using self-signed certificates and SQLite databases: ```bash -$ git clone https://github.com/matrix-org/dendrite +$ git clone https://github.com/element-hq/dendrite $ cd dendrite $ go build -o bin/ ./cmd/... @@ -116,12 +116,12 @@ This means Dendrite supports amongst others: ## Contributing We would be grateful for any help on issues marked as -[Are We Synapse Yet](https://github.com/matrix-org/dendrite/labels/are-we-synapse-yet). These issues +[Are We Synapse Yet](https://github.com/element-hq/dendrite/labels/are-we-synapse-yet). These issues all have related Sytests which need to pass in order for the issue to be closed. Once you've written your code, you can quickly run Sytest to ensure that the test names are now passing. If you're new to the project, see our [Contributing page](https://matrix-org.github.io/dendrite/development/contributing) to get up to speed, then -look for [Good First Issues](https://github.com/matrix-org/dendrite/labels/good%20first%20issue). If you're -familiar with the project, look for [Help Wanted](https://github.com/matrix-org/dendrite/labels/help-wanted) +look for [Good First Issues](https://github.com/element-hq/dendrite/labels/good%20first%20issue). If you're +familiar with the project, look for [Help Wanted](https://github.com/element-hq/dendrite/labels/help-wanted) issues. diff --git a/appservice/api/query.go b/appservice/api/query.go index 8e159152ee..f148f4e6f8 100644 --- a/appservice/api/query.go +++ b/appservice/api/query.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package api contains methods used by dendrite components in multi-process // mode to send requests to the appservice component, typically in order to ask @@ -22,8 +13,8 @@ import ( "encoding/json" "errors" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + userapi "github.com/element-hq/dendrite/userapi/api" ) // AppServiceInternalAPI is used to query user and room alias data from application diff --git a/appservice/appservice.go b/appservice/appservice.go index d94a483e0c..99eefd53a2 100644 --- a/appservice/appservice.go +++ b/appservice/appservice.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2018 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package appservice @@ -18,17 +10,17 @@ import ( "context" "sync" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/appservice/consumers" - "github.com/matrix-org/dendrite/appservice/query" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/appservice/consumers" + "github.com/element-hq/dendrite/appservice/query" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" ) // NewInternalAPI returns a concerete implementation of the internal API. Callers diff --git a/appservice/appservice_test.go b/appservice/appservice_test.go index aa2af9f24e..b7cd88562f 100644 --- a/appservice/appservice_test.go +++ b/appservice/appservice_test.go @@ -14,33 +14,33 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/clientapi" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi" - uapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi" + uapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/appservice/consumers" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/appservice/consumers" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/test/testrig" + "github.com/element-hq/dendrite/test/testrig" ) var testIsBlacklistedOrBackingOff = func(s spec.ServerName) (*statistics.ServerStatistics, error) { diff --git a/appservice/consumers/roomserver.go b/appservice/consumers/roomserver.go index b07b24fcc3..862dde49c6 100644 --- a/appservice/consumers/roomserver.go +++ b/appservice/consumers/roomserver.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2018 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -29,12 +21,12 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/synctypes" log "github.com/sirupsen/logrus" ) @@ -251,7 +243,7 @@ func (s *appserviceState) backoffAndPause(err error) error { // appserviceIsInterestedInEvent returns a boolean depending on whether a given // event falls within one of a given application service's namespaces. // -// TODO: This should be cached, see https://github.com/matrix-org/dendrite/issues/1682 +// TODO: This should be cached, see https://github.com/element-hq/dendrite/issues/1682 func (s *OutputRoomEventConsumer) appserviceIsInterestedInEvent(ctx context.Context, event *types.HeaderedEvent, appservice *config.ApplicationService) bool { user := "" userID, err := s.rsAPI.QueryUserIDForSender(ctx, event.RoomID(), event.SenderID()) diff --git a/appservice/query/query.go b/appservice/query/query.go index 7f33e17f8d..1bf688e8ef 100644 --- a/appservice/query/query.go +++ b/appservice/query/query.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package query handles requests from other internal dendrite components when // they interact with the AppServiceQueryAPI. @@ -27,9 +18,9 @@ import ( log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/setup/config" ) // AppServiceQueryAPI is an implementation of api.AppServiceQueryAPI diff --git a/build/dendritejs-pinecone/jsServer.go b/build/dendritejs-pinecone/jsServer.go index 4298c2ae98..f2f60f0bae 100644 --- a/build/dendritejs-pinecone/jsServer.go +++ b/build/dendritejs-pinecone/jsServer.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build wasm // +build wasm @@ -34,13 +26,16 @@ type JSServer struct { // OnRequestFromJS is the function that JS will invoke when there is a new request. // The JS function signature is: -// function(reqString: string): Promise<{result: string, error: string}> +// +// function(reqString: string): Promise<{result: string, error: string}> +// // Usage is like: -// const res = await global._go_js_server.fetch(reqString); -// if (res.error) { -// // handle error: this is a 'network' error, not a non-2xx error. -// } -// const rawHttpResponse = res.result; +// +// const res = await global._go_js_server.fetch(reqString); +// if (res.error) { +// // handle error: this is a 'network' error, not a non-2xx error. +// } +// const rawHttpResponse = res.result; func (h *JSServer) OnRequestFromJS(this js.Value, args []js.Value) interface{} { // we HAVE to spawn a new goroutine and return immediately or else Go will deadlock // if this request blocks at all e.g for /sync calls diff --git a/build/dendritejs-pinecone/main.go b/build/dendritejs-pinecone/main.go index 6acc93c7b2..5b3ba729f7 100644 --- a/build/dendritejs-pinecone/main.go +++ b/build/dendritejs-pinecone/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build wasm // +build wasm @@ -23,21 +15,21 @@ import ( "fmt" "syscall/js" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/conn" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/rooms" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/userapi" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/conn" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/rooms" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/userapi" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/gomatrixserverlib" diff --git a/build/dendritejs-pinecone/main_noop.go b/build/dendritejs-pinecone/main_noop.go index 0cc7e47e50..48b92fe031 100644 --- a/build/dendritejs-pinecone/main_noop.go +++ b/build/dendritejs-pinecone/main_noop.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm diff --git a/build/dendritejs-pinecone/main_test.go b/build/dendritejs-pinecone/main_test.go index 17fea6cce2..7e7bb1dd5e 100644 --- a/build/dendritejs-pinecone/main_test.go +++ b/build/dendritejs-pinecone/main_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build wasm // +build wasm diff --git a/build/gobind-pinecone/monolith.go b/build/gobind-pinecone/monolith.go index 8718c71fd3..1b55864ea3 100644 --- a/build/gobind-pinecone/monolith.go +++ b/build/gobind-pinecone/monolith.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package gobind @@ -24,16 +16,16 @@ import ( "path/filepath" "strings" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/conduit" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/monolith" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/relay" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/process" - userapiAPI "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/conduit" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/monolith" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/relay" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/process" + userapiAPI "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/pinecone/types" diff --git a/build/gobind-pinecone/monolith_test.go b/build/gobind-pinecone/monolith_test.go index f16d1d764f..99446d3003 100644 --- a/build/gobind-pinecone/monolith_test.go +++ b/build/gobind-pinecone/monolith_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package gobind diff --git a/build/gobind-pinecone/platform_ios.go b/build/gobind-pinecone/platform_ios.go index a89ebfcd03..88bde39f55 100644 --- a/build/gobind-pinecone/platform_ios.go +++ b/build/gobind-pinecone/platform_ios.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build ios // +build ios diff --git a/build/gobind-pinecone/platform_other.go b/build/gobind-pinecone/platform_other.go index 2793026b80..23e4108ca8 100644 --- a/build/gobind-pinecone/platform_other.go +++ b/build/gobind-pinecone/platform_other.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !ios // +build !ios diff --git a/build/gobind-yggdrasil/monolith.go b/build/gobind-yggdrasil/monolith.go index 2b227d3736..335028c89a 100644 --- a/build/gobind-yggdrasil/monolith.go +++ b/build/gobind-yggdrasil/monolith.go @@ -12,26 +12,26 @@ import ( "path/filepath" "time" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/yggconn" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/yggrooms" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi" "github.com/getsentry/sentry-go" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/yggconn" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/yggrooms" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" diff --git a/clientapi/README.md b/clientapi/README.md index 6d4a9dce47..48ae6a87af 100644 --- a/clientapi/README.md +++ b/clientapi/README.md @@ -1,4 +1,4 @@ -This component roughly corresponds to "Client Room Send" and "Client Sync" on [the WIRING diagram](https://github.com/matrix-org/dendrite/blob/master/WIRING.md). +This component roughly corresponds to "Client Room Send" and "Client Sync" on [the WIRING diagram](https://github.com/element-hq/dendrite/blob/master/WIRING.md). This component produces multiple binaries. ## Internals diff --git a/clientapi/admin_test.go b/clientapi/admin_test.go index b2adeb757b..d3c5bcee03 100644 --- a/clientapi/admin_test.go +++ b/clientapi/admin_test.go @@ -11,26 +11,26 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/roomserver/api" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/syncapi" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/roomserver/api" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/syncapi" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/tidwall/gjson" - capi "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi" - uapi "github.com/matrix-org/dendrite/userapi/api" + capi "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi" + uapi "github.com/element-hq/dendrite/userapi/api" ) func TestAdminCreateToken(t *testing.T) { diff --git a/clientapi/api/api.go b/clientapi/api/api.go index 28ff593fcc..5e3247f14a 100644 --- a/clientapi/api/api.go +++ b/clientapi/api/api.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api diff --git a/clientapi/auth/auth.go b/clientapi/auth/auth.go index 8fae45b8d6..c32ed0fae0 100644 --- a/clientapi/auth/auth.go +++ b/clientapi/auth/auth.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package auth implements authentication checks and storage. package auth @@ -23,7 +15,7 @@ import ( "net/http" "strings" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/auth/authtypes/flow.go b/clientapi/auth/authtypes/flow.go index d5766fcc28..0f5d536ab8 100644 --- a/clientapi/auth/authtypes/flow.go +++ b/clientapi/auth/authtypes/flow.go @@ -1,16 +1,8 @@ -// Copyright Andrew Morgan +// Copyright 2024 New Vector Ltd. +// Copyright 2017 Andrew Morgan // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package authtypes diff --git a/clientapi/auth/authtypes/membership.go b/clientapi/auth/authtypes/membership.go index ad5312db6b..cf21453ec3 100644 --- a/clientapi/auth/authtypes/membership.go +++ b/clientapi/auth/authtypes/membership.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package authtypes diff --git a/clientapi/auth/authtypes/profile.go b/clientapi/auth/authtypes/profile.go index 29468c168a..9d162fb26d 100644 --- a/clientapi/auth/authtypes/profile.go +++ b/clientapi/auth/authtypes/profile.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package authtypes diff --git a/clientapi/auth/authtypes/threepid.go b/clientapi/auth/authtypes/threepid.go index ebafbe6aa1..1d7653d680 100644 --- a/clientapi/auth/authtypes/threepid.go +++ b/clientapi/auth/authtypes/threepid.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package authtypes diff --git a/clientapi/auth/login.go b/clientapi/auth/login.go index 58a27e5932..3502cdeced 100644 --- a/clientapi/auth/login.go +++ b/clientapi/auth/login.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package auth @@ -19,9 +11,9 @@ import ( "io" "net/http" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/setup/config" - uapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/setup/config" + uapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/auth/login_application_service.go b/clientapi/auth/login_application_service.go index dd4a9cbb48..9742424174 100644 --- a/clientapi/auth/login_application_service.go +++ b/clientapi/auth/login_application_service.go @@ -1,26 +1,18 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package auth import ( "context" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/util" ) diff --git a/clientapi/auth/login_test.go b/clientapi/auth/login_test.go index a2c2a719c1..617348f737 100644 --- a/clientapi/auth/login_test.go +++ b/clientapi/auth/login_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package auth @@ -23,9 +15,9 @@ import ( "strings" "testing" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/setup/config" - uapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/setup/config" + uapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/auth/login_token.go b/clientapi/auth/login_token.go index eb631481aa..c46680a49e 100644 --- a/clientapi/auth/login_token.go +++ b/clientapi/auth/login_token.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package auth @@ -18,10 +10,10 @@ import ( "context" "net/http" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/setup/config" - uapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/setup/config" + uapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/auth/password.go b/clientapi/auth/password.go index fb7def024b..aab948212e 100644 --- a/clientapi/auth/password.go +++ b/clientapi/auth/password.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package auth @@ -19,11 +11,11 @@ import ( "net/http" "strings" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/auth/user_interactive.go b/clientapi/auth/user_interactive.go index 9831450ccd..cc5fbfbed6 100644 --- a/clientapi/auth/user_interactive.go +++ b/clientapi/auth/user_interactive.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package auth @@ -20,8 +12,8 @@ import ( "net/http" "sync" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/sirupsen/logrus" diff --git a/clientapi/auth/user_interactive_test.go b/clientapi/auth/user_interactive_test.go index 4003e96472..bdafd04538 100644 --- a/clientapi/auth/user_interactive_test.go +++ b/clientapi/auth/user_interactive_test.go @@ -6,8 +6,8 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/clientapi.go b/clientapi/clientapi.go index aee16eb00d..dbf862ca6d 100644 --- a/clientapi/clientapi.go +++ b/clientapi/clientapi.go @@ -1,34 +1,26 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package clientapi import ( - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/producers" - "github.com/matrix-org/dendrite/clientapi/routing" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/transactions" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/jetstream" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/producers" + "github.com/element-hq/dendrite/clientapi/routing" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/transactions" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/jetstream" ) // AddPublicRoutes sets up and registers HTTP handlers for the ClientAPI component. diff --git a/clientapi/clientapi_test.go b/clientapi/clientapi_test.go index c550b20835..ad2d4ad486 100644 --- a/clientapi/clientapi_test.go +++ b/clientapi/clientapi_test.go @@ -13,25 +13,25 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/routing" - "github.com/matrix-org/dendrite/clientapi/threepid" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/pushrules" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/version" - "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi" - uapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/routing" + "github.com/element-hq/dendrite/clientapi/threepid" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/pushrules" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/version" + "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi" + uapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/clientapi/httputil/httputil.go b/clientapi/httputil/httputil.go index d9f4423231..8e22bbcb60 100644 --- a/clientapi/httputil/httputil.go +++ b/clientapi/httputil/httputil.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package httputil diff --git a/clientapi/httputil/parse.go b/clientapi/httputil/parse.go index a952d1778d..8ceadcf062 100644 --- a/clientapi/httputil/parse.go +++ b/clientapi/httputil/parse.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package httputil diff --git a/clientapi/producers/syncapi.go b/clientapi/producers/syncapi.go index 905ecce4d0..330a1685f8 100644 --- a/clientapi/producers/syncapi.go +++ b/clientapi/producers/syncapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package producers @@ -26,9 +18,9 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) // SyncAPIProducer produces events for the sync API server to consume diff --git a/clientapi/routing/account_data.go b/clientapi/routing/account_data.go index 81afc3b13f..4fc19134a9 100644 --- a/clientapi/routing/account_data.go +++ b/clientapi/routing/account_data.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,11 +12,11 @@ import ( "io" "net/http" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/producers" - "github.com/matrix-org/dendrite/internal/eventutil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/producers" + "github.com/element-hq/dendrite/internal/eventutil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/admin.go b/clientapi/routing/admin.go index 73a0afc32c..48e58209c7 100644 --- a/clientapi/routing/admin.go +++ b/clientapi/routing/admin.go @@ -10,9 +10,9 @@ import ( "strconv" "time" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/eventutil" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/eventutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" @@ -20,13 +20,13 @@ import ( "github.com/sirupsen/logrus" "golang.org/x/exp/constraints" - clientapi "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/internal/httputil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/userapi/api" - userapi "github.com/matrix-org/dendrite/userapi/api" + clientapi "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/internal/httputil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/userapi/api" + userapi "github.com/element-hq/dendrite/userapi/api" ) var validRegistrationTokenRegex = regexp.MustCompile("^[[:ascii:][:digit:]_]*$") diff --git a/clientapi/routing/admin_whois.go b/clientapi/routing/admin_whois.go index 7d7536564e..cd1a8d2f11 100644 --- a/clientapi/routing/admin_whois.go +++ b/clientapi/routing/admin_whois.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 David Spenler // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/aliases.go b/clientapi/routing/aliases.go index 2d6b72d3ea..448df8a63c 100644 --- a/clientapi/routing/aliases.go +++ b/clientapi/routing/aliases.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,8 +11,8 @@ import ( "fmt" "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/auth_fallback.go b/clientapi/routing/auth_fallback.go index f8d3684fee..713b0bab5d 100644 --- a/clientapi/routing/auth_fallback.go +++ b/clientapi/routing/auth_fallback.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2019 Parminder Singh // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,8 +11,8 @@ import ( "html/template" "net/http" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/auth_fallback_test.go b/clientapi/routing/auth_fallback_test.go index afeca051be..f2ae816892 100644 --- a/clientapi/routing/auth_fallback_test.go +++ b/clientapi/routing/auth_fallback_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/setup/config" ) func Test_AuthFallback(t *testing.T) { diff --git a/clientapi/routing/capabilities.go b/clientapi/routing/capabilities.go index 38e5bd4672..157d2bd22c 100644 --- a/clientapi/routing/capabilities.go +++ b/clientapi/routing/capabilities.go @@ -1,24 +1,16 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/version" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/version" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/createroom.go b/clientapi/routing/createroom.go index 47e3ba1c30..dfc151730b 100644 --- a/clientapi/routing/createroom.go +++ b/clientapi/routing/createroom.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -22,14 +14,14 @@ import ( "strings" "time" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - roomserverVersion "github.com/matrix-org/dendrite/roomserver/version" - "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + roomserverVersion "github.com/element-hq/dendrite/roomserver/version" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" log "github.com/sirupsen/logrus" diff --git a/clientapi/routing/deactivate.go b/clientapi/routing/deactivate.go index c151c130a5..6b408506cb 100644 --- a/clientapi/routing/deactivate.go +++ b/clientapi/routing/deactivate.go @@ -4,8 +4,8 @@ import ( "io" "net/http" - "github.com/matrix-org/dendrite/clientapi/auth" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/device.go b/clientapi/routing/device.go index 6f2de35396..9b059469c2 100644 --- a/clientapi/routing/device.go +++ b/clientapi/routing/device.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Paul Tötterman // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,9 +12,9 @@ import ( "net" "net/http" - "github.com/matrix-org/dendrite/clientapi/auth" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/directory.go b/clientapi/routing/directory.go index 9466f583f1..ef8e3075c3 100644 --- a/clientapi/routing/directory.go +++ b/clientapi/routing/directory.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -23,11 +15,11 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/httputil" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" ) type roomDirectoryResponse struct { diff --git a/clientapi/routing/directory_public.go b/clientapi/routing/directory_public.go index 67146630cc..9a30b85bd2 100644 --- a/clientapi/routing/directory_public.go +++ b/clientapi/routing/directory_public.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -27,10 +19,10 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/httputil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" ) var ( diff --git a/clientapi/routing/joined_rooms.go b/clientapi/routing/joined_rooms.go index 3fe0d8b4d0..88b65089d4 100644 --- a/clientapi/routing/joined_rooms.go +++ b/clientapi/routing/joined_rooms.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,8 +11,8 @@ import ( "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/roomserver/api" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/routing/joinroom.go b/clientapi/routing/joinroom.go index 43331b42ae..30cb3233c2 100644 --- a/clientapi/routing/joinroom.go +++ b/clientapi/routing/joinroom.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,11 +11,11 @@ import ( "net/http" "time" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal/eventutil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal/eventutil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/joinroom_test.go b/clientapi/routing/joinroom_test.go index bd854efa89..9e2dd0c5a4 100644 --- a/clientapi/routing/joinroom_test.go +++ b/clientapi/routing/joinroom_test.go @@ -7,19 +7,19 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi" - uapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi" + uapi "github.com/element-hq/dendrite/userapi/api" ) var testIsBlacklistedOrBackingOff = func(s spec.ServerName) (*statistics.ServerStatistics, error) { diff --git a/clientapi/routing/key_backup.go b/clientapi/routing/key_backup.go index 7f8bd9f403..69619cffff 100644 --- a/clientapi/routing/key_backup.go +++ b/clientapi/routing/key_backup.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,8 +11,8 @@ import ( "fmt" "net/http" - "github.com/matrix-org/dendrite/clientapi/httputil" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/key_crosssigning.go b/clientapi/routing/key_crosssigning.go index 6bf7c58e3d..e6f093b5e8 100644 --- a/clientapi/routing/key_crosssigning.go +++ b/clientapi/routing/key_crosssigning.go @@ -1,27 +1,19 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/clientapi/auth" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/keys.go b/clientapi/routing/keys.go index 871b8b08e3..0a8b4e68ec 100644 --- a/clientapi/routing/keys.go +++ b/clientapi/routing/keys.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,8 +13,8 @@ import ( "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/routing/leaveroom.go b/clientapi/routing/leaveroom.go index 7e8c066eb2..753e732234 100644 --- a/clientapi/routing/leaveroom.go +++ b/clientapi/routing/leaveroom.go @@ -1,24 +1,16 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/userapi/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/login.go b/clientapi/routing/login.go index 0f55c88165..442719a1d3 100644 --- a/clientapi/routing/login.go +++ b/clientapi/routing/login.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,11 +10,11 @@ import ( "context" "net/http" - "github.com/matrix-org/dendrite/clientapi/auth" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/login_test.go b/clientapi/routing/login_test.go index 3f89344904..b987e6f233 100644 --- a/clientapi/routing/login_test.go +++ b/clientapi/routing/login_test.go @@ -9,21 +9,21 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi" - uapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi" + uapi "github.com/element-hq/dendrite/userapi/api" ) func TestLogin(t *testing.T) { diff --git a/clientapi/routing/logout.go b/clientapi/routing/logout.go index d06bac7845..74f6b28dc3 100644 --- a/clientapi/routing/logout.go +++ b/clientapi/routing/logout.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/membership.go b/clientapi/routing/membership.go index 9e41a3794e..9579e64882 100644 --- a/clientapi/routing/membership.go +++ b/clientapi/routing/membership.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,17 +13,17 @@ import ( "net/http" "time" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/threepid" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/getsentry/sentry-go" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/threepid" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/clientapi/routing/memberships.go b/clientapi/routing/memberships.go index 84be498d63..6c6e3d89b6 100644 --- a/clientapi/routing/memberships.go +++ b/clientapi/routing/memberships.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2024 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,8 +10,8 @@ import ( "encoding/json" "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/notification.go b/clientapi/routing/notification.go index 4b9043faae..ebc8f8140f 100644 --- a/clientapi/routing/notification.go +++ b/clientapi/routing/notification.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 Dan Peleg // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,7 +10,7 @@ import ( "net/http" "strconv" - userapi "github.com/matrix-org/dendrite/userapi/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/openid.go b/clientapi/routing/openid.go index 8dfba8af98..4ff40b43f6 100644 --- a/clientapi/routing/openid.go +++ b/clientapi/routing/openid.go @@ -1,24 +1,16 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/password.go b/clientapi/routing/password.go index 24c52b06de..59d9594d60 100644 --- a/clientapi/routing/password.go +++ b/clientapi/routing/password.go @@ -3,12 +3,12 @@ package routing import ( "net/http" - "github.com/matrix-org/dendrite/clientapi/auth" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/peekroom.go b/clientapi/routing/peekroom.go index 772dc8477f..9b6699b09e 100644 --- a/clientapi/routing/peekroom.go +++ b/clientapi/routing/peekroom.go @@ -1,16 +1,7 @@ -// Copyright 2020 New Vector Ltd +// Copyright 2020-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,8 +9,8 @@ import ( "encoding/json" "net/http" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/userapi/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/presence.go b/clientapi/routing/presence.go index 5aa6d8dd29..55282c3f7a 100644 --- a/clientapi/routing/presence.go +++ b/clientapi/routing/presence.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,12 +12,12 @@ import ( "strconv" "time" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/producers" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/producers" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/nats-io/nats.go" diff --git a/clientapi/routing/profile.go b/clientapi/routing/profile.go index 9959144c83..b75d38a62b 100644 --- a/clientapi/routing/profile.go +++ b/clientapi/routing/profile.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -24,14 +16,14 @@ import ( "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrix" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/pusher.go b/clientapi/routing/pusher.go index ed59129ccb..39646393fe 100644 --- a/clientapi/routing/pusher.go +++ b/clientapi/routing/pusher.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 Dan Peleg // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,8 +10,8 @@ import ( "net/http" "net/url" - "github.com/matrix-org/dendrite/clientapi/httputil" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/pushrules.go b/clientapi/routing/pushrules.go index 43c034f9d9..8bc78e021b 100644 --- a/clientapi/routing/pushrules.go +++ b/clientapi/routing/pushrules.go @@ -7,8 +7,8 @@ import ( "net/http" "reflect" - "github.com/matrix-org/dendrite/internal/pushrules" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/pushrules" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/receipt.go b/clientapi/routing/receipt.go index 1d7e35562d..403949eb4a 100644 --- a/clientapi/routing/receipt.go +++ b/clientapi/routing/receipt.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,10 +12,10 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/clientapi/producers" + "github.com/element-hq/dendrite/clientapi/producers" "github.com/matrix-org/gomatrixserverlib/spec" - userapi "github.com/matrix-org/dendrite/userapi/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/util" "github.com/sirupsen/logrus" ) diff --git a/clientapi/routing/redaction.go b/clientapi/routing/redaction.go index f331a73c72..795b311b0b 100644 --- a/clientapi/routing/redaction.go +++ b/clientapi/routing/redaction.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -24,13 +16,13 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/transactions" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/transactions" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" ) type redactionContent struct { diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index 5235e90920..5544dccd3e 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -1,17 +1,9 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // Copyright 2017 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -30,11 +22,11 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/internal" + "github.com/element-hq/dendrite/internal" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" @@ -43,11 +35,11 @@ import ( "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/clientapi/auth" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/userutil" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/userutil" + userapi "github.com/element-hq/dendrite/userapi/api" ) var ( diff --git a/clientapi/routing/register_secret.go b/clientapi/routing/register_secret.go index f384b604a5..e5d6dbee63 100644 --- a/clientapi/routing/register_secret.go +++ b/clientapi/routing/register_secret.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal" + "github.com/element-hq/dendrite/internal" "github.com/matrix-org/util" cache "github.com/patrickmn/go-cache" ) diff --git a/clientapi/routing/register_test.go b/clientapi/routing/register_test.go index 7fa740e7f5..71cc0ca67f 100644 --- a/clientapi/routing/register_test.go +++ b/clientapi/routing/register_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Andrew Morgan // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -27,17 +19,17 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/patrickmn/go-cache" diff --git a/clientapi/routing/report_event.go b/clientapi/routing/report_event.go index 4dc6498d81..dbeb345f08 100644 --- a/clientapi/routing/report_event.go +++ b/clientapi/routing/report_event.go @@ -1,25 +1,17 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/roomserver/api" - userAPI "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/roomserver/api" + userAPI "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/clientapi/routing/room_hierarchy.go b/clientapi/routing/room_hierarchy.go index cf9d43dd1f..82ee35805b 100644 --- a/clientapi/routing/room_hierarchy.go +++ b/clientapi/routing/room_hierarchy.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,10 +11,10 @@ import ( "strconv" "sync" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/google/uuid" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/room_tagging.go b/clientapi/routing/room_tagging.go index 5a5296bf4f..191cf13311 100644 --- a/clientapi/routing/room_tagging.go +++ b/clientapi/routing/room_tagging.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2019 Sumukha PK // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,9 +10,9 @@ import ( "encoding/json" "net/http" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/producers" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/producers" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index e82c8861ca..d72638ee0b 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -28,20 +20,20 @@ import ( "github.com/sirupsen/logrus" "golang.org/x/sync/singleflight" - "github.com/matrix-org/dendrite/setup/base" - userapi "github.com/matrix-org/dendrite/userapi/api" - - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/auth" - clientutil "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/producers" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/transactions" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/base" + userapi "github.com/element-hq/dendrite/userapi/api" + + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + clientutil "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/producers" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/transactions" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" ) type WellKnownClientHomeserver struct { diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go index 44e82aed08..a1a0300d20 100644 --- a/clientapi/routing/sendevent.go +++ b/clientapi/routing/sendevent.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -23,14 +15,14 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/transactions" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/synctypes" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/transactions" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/synctypes" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/sendevent_test.go b/clientapi/routing/sendevent_test.go index 00d19154ad..efa3764370 100644 --- a/clientapi/routing/sendevent_test.go +++ b/clientapi/routing/sendevent_test.go @@ -9,10 +9,10 @@ import ( "strings" "testing" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - uapi "github.com/matrix-org/dendrite/userapi/api" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + uapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/clientapi/routing/sendtodevice.go b/clientapi/routing/sendtodevice.go index 58d3053e23..9068625f9a 100644 --- a/clientapi/routing/sendtodevice.go +++ b/clientapi/routing/sendtodevice.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,10 +11,10 @@ import ( "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/producers" - "github.com/matrix-org/dendrite/internal/transactions" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/producers" + "github.com/element-hq/dendrite/internal/transactions" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/routing/sendtyping.go b/clientapi/routing/sendtyping.go index 979bced3b2..5aa5c96973 100644 --- a/clientapi/routing/sendtyping.go +++ b/clientapi/routing/sendtyping.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -17,10 +10,10 @@ import ( "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/producers" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/producers" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/routing/server_notices.go b/clientapi/routing/server_notices.go index d4644b3e51..8461586785 100644 --- a/clientapi/routing/server_notices.go +++ b/clientapi/routing/server_notices.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -27,15 +19,15 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/transactions" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/transactions" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/routing/state.go b/clientapi/routing/state.go index 18f9a0e9cd..d702fd3bb6 100644 --- a/clientapi/routing/state.go +++ b/clientapi/routing/state.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,10 +12,10 @@ import ( "fmt" "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/synctypes" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/synctypes" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/state_test.go b/clientapi/routing/state_test.go index 93b0437231..c2ad23b05b 100644 --- a/clientapi/routing/state_test.go +++ b/clientapi/routing/state_test.go @@ -7,10 +7,10 @@ import ( "net/http" "testing" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - uapi "github.com/matrix-org/dendrite/userapi/api" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + uapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/thirdparty.go b/clientapi/routing/thirdparty.go index b805d4b51c..83d491d933 100644 --- a/clientapi/routing/thirdparty.go +++ b/clientapi/routing/thirdparty.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,8 +12,8 @@ import ( "github.com/matrix-org/util" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/routing/threepid.go b/clientapi/routing/threepid.go index 5261a14070..2fee21b9b5 100644 --- a/clientapi/routing/threepid.go +++ b/clientapi/routing/threepid.go @@ -1,28 +1,20 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/threepid" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" - userdb "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/clientapi/threepid" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" + userdb "github.com/element-hq/dendrite/userapi/storage" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/clientapi/routing/upgrade_room.go b/clientapi/routing/upgrade_room.go index 03c0230e67..d71cdeaf40 100644 --- a/clientapi/routing/upgrade_room.go +++ b/clientapi/routing/upgrade_room.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,13 +10,13 @@ import ( "errors" "net/http" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal/eventutil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/version" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal/eventutil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/version" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/clientapi/routing/userdirectory.go b/clientapi/routing/userdirectory.go index 32cefde63a..c46fc5a2a2 100644 --- a/clientapi/routing/userdirectory.go +++ b/clientapi/routing/userdirectory.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,9 +13,9 @@ import ( "net/http" "strings" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/roomserver/api" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/roomserver/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" diff --git a/clientapi/routing/voip.go b/clientapi/routing/voip.go index 14a08b79c8..24f68029a1 100644 --- a/clientapi/routing/voip.go +++ b/clientapi/routing/voip.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Michael Telatysnki <7t3chguy@gmail.com> // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -25,8 +17,8 @@ import ( "github.com/matrix-org/gomatrix" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/routing/whoami.go b/clientapi/routing/whoami.go index a1d9d66756..2b0bf52ac0 100644 --- a/clientapi/routing/whoami.go +++ b/clientapi/routing/whoami.go @@ -1,21 +1,14 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/util" ) diff --git a/clientapi/threepid/invites.go b/clientapi/threepid/invites.go index 365e9f8691..f32b7848c8 100644 --- a/clientapi/threepid/invites.go +++ b/clientapi/threepid/invites.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package threepid @@ -24,12 +16,12 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/threepid/threepid.go b/clientapi/threepid/threepid.go index ad94a49c6f..3cf69c3424 100644 --- a/clientapi/threepid/threepid.go +++ b/clientapi/threepid/threepid.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package threepid @@ -24,7 +16,7 @@ import ( "strconv" "strings" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/userutil/userutil.go b/clientapi/userutil/userutil.go index 26237142b2..c4a01383db 100644 --- a/clientapi/userutil/userutil.go +++ b/clientapi/userutil/userutil.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package userutil @@ -17,7 +10,7 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/clientapi/userutil/userutil_test.go b/clientapi/userutil/userutil_test.go index cdda0a88a4..f6c34e5e6d 100644 --- a/clientapi/userutil/userutil_test.go +++ b/clientapi/userutil/userutil_test.go @@ -1,21 +1,14 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package userutil import ( "testing" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go index 772778680d..9e88f7d88b 100644 --- a/cmd/create-account/main.go +++ b/cmd/create-account/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -28,13 +20,13 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal" + "github.com/element-hq/dendrite/internal" "github.com/tidwall/gjson" "github.com/sirupsen/logrus" "golang.org/x/term" - "github.com/matrix-org/dendrite/setup" + "github.com/element-hq/dendrite/setup" ) const usage = `Usage: %s diff --git a/cmd/dendrite-demo-pinecone/conduit/conduit.go b/cmd/dendrite-demo-pinecone/conduit/conduit.go index be139c19ca..b747e051e6 100644 --- a/cmd/dendrite-demo-pinecone/conduit/conduit.go +++ b/cmd/dendrite-demo-pinecone/conduit/conduit.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package conduit diff --git a/cmd/dendrite-demo-pinecone/conduit/conduit_test.go b/cmd/dendrite-demo-pinecone/conduit/conduit_test.go index d8cd3133f7..25c9c27952 100644 --- a/cmd/dendrite-demo-pinecone/conduit/conduit_test.go +++ b/cmd/dendrite-demo-pinecone/conduit/conduit_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package conduit diff --git a/cmd/dendrite-demo-pinecone/conn/client.go b/cmd/dendrite-demo-pinecone/conn/client.go index 5d1417dd5f..8b21e5a84f 100644 --- a/cmd/dendrite-demo-pinecone/conn/client.go +++ b/cmd/dendrite-demo-pinecone/conn/client.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package conn @@ -21,7 +13,7 @@ import ( "net/http" "strings" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/fclient" "nhooyr.io/websocket" diff --git a/cmd/dendrite-demo-pinecone/conn/ws.go b/cmd/dendrite-demo-pinecone/conn/ws.go index ed85abd51f..6330b0b39d 100644 --- a/cmd/dendrite-demo-pinecone/conn/ws.go +++ b/cmd/dendrite-demo-pinecone/conn/ws.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package conn diff --git a/cmd/dendrite-demo-pinecone/defaults/defaults.go b/cmd/dendrite-demo-pinecone/defaults/defaults.go index 9da54d5f5b..7fc4637397 100644 --- a/cmd/dendrite-demo-pinecone/defaults/defaults.go +++ b/cmd/dendrite-demo-pinecone/defaults/defaults.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package defaults diff --git a/cmd/dendrite-demo-pinecone/embed/embed_elementweb.go b/cmd/dendrite-demo-pinecone/embed/embed_elementweb.go index d37362e21c..ea2fe03477 100644 --- a/cmd/dendrite-demo-pinecone/embed/embed_elementweb.go +++ b/cmd/dendrite-demo-pinecone/embed/embed_elementweb.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build elementweb // +build elementweb diff --git a/cmd/dendrite-demo-pinecone/embed/embed_other.go b/cmd/dendrite-demo-pinecone/embed/embed_other.go index 94360fce68..f43d6ae7c3 100644 --- a/cmd/dendrite-demo-pinecone/embed/embed_other.go +++ b/cmd/dendrite-demo-pinecone/embed/embed_other.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !elementweb // +build !elementweb diff --git a/cmd/dendrite-demo-pinecone/main.go b/cmd/dendrite-demo-pinecone/main.go index 18d1dd31f7..b05b63c810 100644 --- a/cmd/dendrite-demo-pinecone/main.go +++ b/cmd/dendrite-demo-pinecone/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -24,14 +16,14 @@ import ( "path/filepath" "strings" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/monolith" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/monolith" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" diff --git a/cmd/dendrite-demo-pinecone/monolith/keys.go b/cmd/dendrite-demo-pinecone/monolith/keys.go index 637f24a43e..de9e415382 100644 --- a/cmd/dendrite-demo-pinecone/monolith/keys.go +++ b/cmd/dendrite-demo-pinecone/monolith/keys.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package monolith @@ -18,8 +10,8 @@ import ( "crypto/ed25519" "os" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" ) func GetOrCreateKey(keyfile string, oldKeyfile string) (ed25519.PrivateKey, ed25519.PublicKey) { diff --git a/cmd/dendrite-demo-pinecone/monolith/monolith.go b/cmd/dendrite-demo-pinecone/monolith/monolith.go index d9f44b5cc0..2fb5e675ee 100644 --- a/cmd/dendrite-demo-pinecone/monolith/monolith.go +++ b/cmd/dendrite-demo-pinecone/monolith/monolith.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package monolith @@ -26,31 +18,31 @@ import ( "sync" "time" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/conn" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/embed" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/relay" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/rooms" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/users" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + "github.com/element-hq/dendrite/federationapi" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/producers" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi" + relayAPI "github.com/element-hq/dendrite/relayapi/api" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup" + "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/userapi" + userAPI "github.com/element-hq/dendrite/userapi/api" "github.com/gorilla/mux" "github.com/gorilla/websocket" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/conn" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/embed" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/relay" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/rooms" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/users" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - "github.com/matrix-org/dendrite/federationapi" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/producers" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi" - relayAPI "github.com/matrix-org/dendrite/relayapi/api" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup" - "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/userapi" - userAPI "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" diff --git a/cmd/dendrite-demo-pinecone/relay/retriever.go b/cmd/dendrite-demo-pinecone/relay/retriever.go index 9c918fb67b..d126aef6a5 100644 --- a/cmd/dendrite-demo-pinecone/relay/retriever.go +++ b/cmd/dendrite-demo-pinecone/relay/retriever.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package relay @@ -20,8 +12,8 @@ import ( "sync/atomic" "time" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - relayServerAPI "github.com/matrix-org/dendrite/relayapi/api" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + relayServerAPI "github.com/element-hq/dendrite/relayapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" ) diff --git a/cmd/dendrite-demo-pinecone/relay/retriever_test.go b/cmd/dendrite-demo-pinecone/relay/retriever_test.go index 6ec9aaf5db..cc60ef8888 100644 --- a/cmd/dendrite-demo-pinecone/relay/retriever_test.go +++ b/cmd/dendrite-demo-pinecone/relay/retriever_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package relay @@ -19,8 +11,8 @@ import ( "testing" "time" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - relayServerAPI "github.com/matrix-org/dendrite/relayapi/api" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + relayServerAPI "github.com/element-hq/dendrite/relayapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" diff --git a/cmd/dendrite-demo-pinecone/rooms/rooms.go b/cmd/dendrite-demo-pinecone/rooms/rooms.go index 57282a003a..7a18c2ea1b 100644 --- a/cmd/dendrite-demo-pinecone/rooms/rooms.go +++ b/cmd/dendrite-demo-pinecone/rooms/rooms.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package rooms @@ -19,8 +11,8 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/defaults" - "github.com/matrix-org/dendrite/federationapi/api" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/defaults" + "github.com/element-hq/dendrite/federationapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/cmd/dendrite-demo-pinecone/users/users.go b/cmd/dendrite-demo-pinecone/users/users.go index 079df328d7..9a7d40e594 100644 --- a/cmd/dendrite-demo-pinecone/users/users.go +++ b/cmd/dendrite-demo-pinecone/users/users.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package users @@ -23,10 +15,10 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - clienthttputil "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-pinecone/defaults" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + clienthttputil "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/cmd/dendrite-demo-pinecone/defaults" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/cmd/dendrite-demo-yggdrasil/main.go b/cmd/dendrite-demo-yggdrasil/main.go index b02f131ae3..2c1eea3843 100644 --- a/cmd/dendrite-demo-yggdrasil/main.go +++ b/cmd/dendrite-demo-yggdrasil/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -27,31 +19,31 @@ import ( "path/filepath" "time" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/embed" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/yggconn" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/yggrooms" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/mscs" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/embed" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/yggconn" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/yggrooms" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/mscs" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi" "github.com/sirupsen/logrus" ) diff --git a/cmd/dendrite-demo-yggdrasil/signing/fetcher.go b/cmd/dendrite-demo-yggdrasil/signing/fetcher.go index aeaa2022ed..523f6c5753 100644 --- a/cmd/dendrite-demo-yggdrasil/signing/fetcher.go +++ b/cmd/dendrite-demo-yggdrasil/signing/fetcher.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package signing diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/client.go b/cmd/dendrite-demo-yggdrasil/yggconn/client.go index e1dc0f6681..54aedb44e7 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/client.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/client.go @@ -4,7 +4,7 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/fclient" ) diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/node.go b/cmd/dendrite-demo-yggdrasil/yggconn/node.go index 3c230f6238..09683d5bb2 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/node.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/node.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package yggconn diff --git a/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go b/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go index 7ebecb651d..429700d8f9 100644 --- a/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go +++ b/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package yggrooms @@ -19,8 +11,8 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/yggconn" - "github.com/matrix-org/dendrite/federationapi/api" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/yggconn" + "github.com/element-hq/dendrite/federationapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/cmd/dendrite-upgrade-tests/main.go b/cmd/dendrite-upgrade-tests/main.go index 871a605d45..8e12435509 100644 --- a/cmd/dendrite-upgrade-tests/main.go +++ b/cmd/dendrite-upgrade-tests/main.go @@ -141,7 +141,7 @@ const dendriteUpgradeTestLabel = "dendrite_upgrade_test" // downloadArchive downloads an arbitrary github archive of the form: // -// https://github.com/matrix-org/dendrite/archive/v0.3.11.tar.gz +// https://github.com/element-hq/dendrite/archive/v0.3.11.tar.gz // // and re-tarballs it without the top-level directory which contains branch information. It inserts // the contents of `dockerfile` as a root file `Dockerfile` in the re-tarballed directory such that @@ -210,7 +210,7 @@ func buildDendrite(httpClient *http.Client, dockerClient *client.Client, tmpDir log.Printf("%s: Downloading version %s to %s\n", branchOrTagName, branchOrTagName, tmpDir) // pull an archive, this contains a top-level directory which screws with the build context // which we need to fix up post download - u := fmt.Sprintf("https://github.com/matrix-org/dendrite/archive/%s.tar.gz", branchOrTagName) + u := fmt.Sprintf("https://github.com/element-hq/dendrite/archive/%s.tar.gz", branchOrTagName) tarball, err = downloadArchive(httpClient, tmpDir, u, dockerfile()) if err != nil { return "", fmt.Errorf("failed to download archive %s: %w", u, err) @@ -255,7 +255,7 @@ func buildDendrite(httpClient *http.Client, dockerClient *client.Client, tmpDir } func getAndSortVersionsFromGithub(httpClient *http.Client) (semVers []*semver.Version, err error) { - u := "https://api.github.com/repos/matrix-org/dendrite/tags" + u := "https://api.github.com/repos/element-hq/dendrite/tags" var res *http.Response for i := 0; i < 3; i++ { diff --git a/cmd/dendrite/main.go b/cmd/dendrite/main.go index 5234b75047..da43432fbd 100644 --- a/cmd/dendrite/main.go +++ b/cmd/dendrite/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -18,25 +10,25 @@ import ( "flag" "time" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/mscs" - "github.com/matrix-org/dendrite/userapi" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/mscs" + "github.com/element-hq/dendrite/userapi" ) var ( diff --git a/cmd/generate-config/main.go b/cmd/generate-config/main.go index 2379ce2bb9..c6399ec50b 100644 --- a/cmd/generate-config/main.go +++ b/cmd/generate-config/main.go @@ -8,7 +8,7 @@ import ( "golang.org/x/crypto/bcrypt" "gopkg.in/yaml.v2" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/cmd/generate-keys/main.go b/cmd/generate-keys/main.go index d4c8cf78ae..43c1eca178 100644 --- a/cmd/generate-keys/main.go +++ b/cmd/generate-keys/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -20,7 +12,7 @@ import ( "log" "os" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/test" ) const usage = `Usage: %s diff --git a/cmd/resolve-state/main.go b/cmd/resolve-state/main.go index d6db724365..fd98c0d473 100644 --- a/cmd/resolve-state/main.go +++ b/cmd/resolve-state/main.go @@ -9,14 +9,14 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/contrib/dendrite-demo-i2p/main.go b/contrib/dendrite-demo-i2p/main.go index 92cfab49aa..27f69acb6f 100644 --- a/contrib/dendrite-demo-i2p/main.go +++ b/contrib/dendrite-demo-i2p/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -19,25 +11,25 @@ import ( "os" "time" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/mscs" - "github.com/matrix-org/dendrite/userapi" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/mscs" + "github.com/element-hq/dendrite/userapi" ) var ( diff --git a/contrib/dendrite-demo-i2p/main_i2p.go b/contrib/dendrite-demo-i2p/main_i2p.go index 72fed656e3..9104b7e11b 100644 --- a/contrib/dendrite-demo-i2p/main_i2p.go +++ b/contrib/dendrite-demo-i2p/main_i2p.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -27,19 +19,19 @@ import ( "text/template" "github.com/cretz/bine/tor" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/setup/process" "github.com/eyedeekay/goSam" "github.com/eyedeekay/onramp" sentryhttp "github.com/getsentry/sentry-go/http" "github.com/gorilla/mux" "github.com/kardianos/minwinsvc" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/setup/process" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/sirupsen/logrus" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" ) func client() (*goSam.Client, error) { diff --git a/contrib/dendrite-demo-tor/main.go b/contrib/dendrite-demo-tor/main.go index f82d6d538d..132b557f19 100644 --- a/contrib/dendrite-demo-tor/main.go +++ b/contrib/dendrite-demo-tor/main.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -18,25 +10,25 @@ import ( "os" "time" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/appservice" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/setup" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/mscs" - "github.com/matrix-org/dendrite/userapi" + "github.com/element-hq/dendrite/appservice" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/setup" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/mscs" + "github.com/element-hq/dendrite/userapi" ) var _, skip = os.LookupEnv("CI") diff --git a/contrib/dendrite-demo-tor/main_tor.go b/contrib/dendrite-demo-tor/main_tor.go index 8f889c41a1..8e73212a7c 100644 --- a/contrib/dendrite-demo-tor/main_tor.go +++ b/contrib/dendrite-demo-tor/main_tor.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package main @@ -26,18 +18,18 @@ import ( "text/template" "github.com/cretz/bine/tor" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/setup/process" "github.com/eyedeekay/onramp" sentryhttp "github.com/getsentry/sentry-go/http" "github.com/gorilla/mux" "github.com/kardianos/minwinsvc" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/setup/process" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/sirupsen/logrus" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" ) func start() (*tor.Tor, error) { diff --git a/dendrite-sample.yaml b/dendrite-sample.yaml index 8616e120eb..0ee381f029 100644 --- a/dendrite-sample.yaml +++ b/dendrite-sample.yaml @@ -188,14 +188,13 @@ client_api: recaptcha_public_key: "" recaptcha_private_key: "" recaptcha_bypass_secret: "" - + # To use hcaptcha.com instead of ReCAPTCHA, set the following parameters, otherwise just keep them empty. # recaptcha_siteverify_api: "https://hcaptcha.com/siteverify" # recaptcha_api_js_url: "https://js.hcaptcha.com/1/api.js" # recaptcha_form_field: "h-captcha-response" # recaptcha_sitekey_class: "h-captcha" - # TURN server information that this homeserver should send to clients. turn: turn_user_lifetime: "5m" @@ -337,7 +336,7 @@ user_api: # worker_count: 8 # Configuration for Opentracing. -# See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on +# See https://github.com/element-hq/dendrite/tree/master/docs/tracing for information on # how this works and how to set it up. tracing: enabled: false diff --git a/docs/FAQ.md b/docs/FAQ.md index 2ef9e6c2b4..a7ba979e25 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -18,13 +18,13 @@ Mostly, although there are still bugs and missing features. If you are a confide ## Is Dendrite feature-complete? -No, although a good portion of the Matrix specification has been implemented. Mostly missing are client features - see the [readme](https://github.com/matrix-org/dendrite/blob/main/README.md) at the root of the repository for more information. +No, although a good portion of the Matrix specification has been implemented. Mostly missing are client features - see the [readme](https://github.com/element-hq/dendrite/blob/main/README.md) at the root of the repository for more information. ## Why doesn't Dendrite have "x" yet? -Dendrite development is currently supported by a small team of developers and due to those limited resources, the majority of the effort is focused on getting Dendrite to be -specification complete. If there are major features you're requesting (e.g. new administration endpoints), we'd like to strongly encourage you to join the community in supporting -the development efforts through [contributing](./development/CONTRIBUTING.md). +Dendrite development is currently supported by a small team of developers and due to those limited resources, the majority of the effort is focused on getting Dendrite to be +specification complete. If there are major features you're requesting (e.g. new administration endpoints), we'd like to strongly encourage you to join the community in supporting +the development efforts through [contributing](./development/CONTRIBUTING.md). ## Is there a migration path from Synapse to Dendrite? @@ -37,7 +37,7 @@ No, Dendrite has a very different database schema to Synapse and the two are not ## Can I configure which port Dendrite listens on? -Yes, use the cli flag `-http-bind-address`. +Yes, use the cli flag `-http-bind-address`. ## I've installed Dendrite but federation isn't working @@ -130,9 +130,9 @@ We don't officially support this or any other dedicated media storage solutions. ## Is there an upgrade guide for Dendrite? -Run a newer docker image. We don't officially support deployments other than Docker. -Most of the time you should be able to just -- stop +Run a newer docker image. We don't officially support deployments other than Docker. +Most of the time you should be able to just +- stop - replace binary - start diff --git a/docs/_config.yml b/docs/_config.yml index ed93fd7967..7af6803986 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -10,7 +10,7 @@ plugins: - jekyll-feed aux_links: "GitHub": - - "//github.com/matrix-org/dendrite" + - "//github.com/element-hq/dendrite" aux_links_new_tab: true sass: sass_dir: _sass diff --git a/docs/development/CONTRIBUTING.md b/docs/development/CONTRIBUTING.md index caab1e749f..0d6f533c4e 100644 --- a/docs/development/CONTRIBUTING.md +++ b/docs/development/CONTRIBUTING.md @@ -101,7 +101,7 @@ We also have unit tests which we run via: DENDRITE_TEST_SKIP_NODB=1 go test --race ./... ``` -This only runs SQLite database tests. If you wish to execute Postgres tests as well, you'll either need to +This only runs SQLite database tests. If you wish to execute Postgres tests as well, you'll either need to have Postgres installed locally (`createdb` will be used) or have a remote/containerized Postgres instance available. @@ -119,7 +119,7 @@ code is functioning as intended is great, and to ensure that we will find out qu in the future if any regressions happen. We use the standard [Go testing package](https://gobyexample.com/testing) for this, -alongside some helper functions in our own [`test` package](https://pkg.go.dev/github.com/matrix-org/dendrite/test). +alongside some helper functions in our own [`test` package](https://pkg.go.dev/github.com/element-hq/dendrite/test). ## Continuous integration @@ -131,7 +131,7 @@ test suites ([Complement](https://github.com/matrix-org/complement) and [SyTest](https://github.com/matrix-org/sytest)). You can see the progress of any CI jobs at the bottom of the Pull Request page, or by -looking at the [Actions](https://github.com/matrix-org/dendrite/actions) tab of the Dendrite +looking at the [Actions](https://github.com/element-hq/dendrite/actions) tab of the Dendrite repository. We generally won't accept a submission unless all of the CI jobs are passing. We @@ -152,7 +152,7 @@ significant amount of CPU and RAM. Once the code builds, run [Sytest](https://github.com/matrix-org/sytest) according to the guide in -[docs/development/sytest.md](https://github.com/matrix-org/dendrite/blob/main/docs/development/sytest.md#using-a-sytest-docker-image) +[docs/development/sytest.md](https://github.com/element-hq/dendrite/blob/main/docs/development/sytest.md#using-a-sytest-docker-image) so you can see whether something is being broken and whether there are newly passing tests. @@ -162,17 +162,17 @@ tests. ## Picking things to do If you're new then feel free to pick up an issue labelled [good first -issue](https://github.com/matrix-org/dendrite/labels/good%20first%20issue). +issue](https://github.com/element-hq/dendrite/labels/good%20first%20issue). These should be well-contained, small pieces of work that can be picked up to help you get familiar with the code base. Once you're comfortable with hacking on Dendrite there are issues labelled as -[help wanted](https://github.com/matrix-org/dendrite/labels/help-wanted), +[help wanted](https://github.com/element-hq/dendrite/labels/help-wanted), these are often slightly larger or more complicated pieces of work but are hopefully nonetheless fairly well-contained. We ask people who are familiar with Dendrite to leave the [good first -issue](https://github.com/matrix-org/dendrite/labels/good%20first%20issue) +issue](https://github.com/element-hq/dendrite/labels/good%20first%20issue) issues so that there is always a way for new people to come and get involved. ## Getting help diff --git a/docs/development/sytest.md b/docs/development/sytest.md index 2f681f3e5b..7f2c27e63a 100644 --- a/docs/development/sytest.md +++ b/docs/development/sytest.md @@ -28,7 +28,7 @@ go build -o bin/ ./cmd/... ``` If you are fixing an issue marked with -[Are We Synapse Yet](https://github.com/matrix-org/dendrite/labels/are-we-synapse-yet) +[Are We Synapse Yet](https://github.com/element-hq/dendrite/labels/are-we-synapse-yet) then there will be a list of Sytests that you should add to the whitelist when you have fixed that issue. This MUST be included in your PR to ensure that the issue is fully resolved. diff --git a/docs/installation/1_planning.md b/docs/installation/1_planning.md index e113ca2d3c..3ae601ef13 100644 --- a/docs/installation/1_planning.md +++ b/docs/installation/1_planning.md @@ -77,8 +77,8 @@ therefore does not need this to be manually installed. A reverse proxy such as [Caddy](https://caddyserver.com), [NGINX](https://www.nginx.com) or [HAProxy](http://www.haproxy.org) is useful for deployments. Configuring this is not covered in this documentation, although sample configurations -for [Caddy](https://github.com/matrix-org/dendrite/blob/main/docs/caddy) and -[NGINX](https://github.com/matrix-org/dendrite/blob/main/docs/nginx) are provided. +for [Caddy](https://github.com/element-hq/dendrite/blob/main/docs/caddy) and +[NGINX](https://github.com/element-hq/dendrite/blob/main/docs/nginx) are provided. ### Windows diff --git a/docs/installation/docker/1_docker.md b/docs/installation/docker/1_docker.md index f339997252..85de694f7d 100644 --- a/docs/installation/docker/1_docker.md +++ b/docs/installation/docker/1_docker.md @@ -9,7 +9,7 @@ permalink: /installation/docker/install # Installing Dendrite using Docker Compose -Dendrite provides an [example](https://github.com/matrix-org/dendrite/blob/main/build/docker/docker-compose.yml) +Dendrite provides an [example](https://github.com/element-hq/dendrite/blob/main/build/docker/docker-compose.yml) Docker compose file, which needs some preparation to start successfully. Please note that this compose file only has Postgres as a dependency, and you need to configure a [reverse proxy](../planning#reverse-proxy). @@ -57,5 +57,5 @@ You can then change `config/dendrite.yaml` to your liking. Once you're done changing the config, you can now start up Dendrite with ```bash -docker-compose -f docker-compose.yml up +docker-compose -f docker-compose.yml up ``` diff --git a/docs/installation/helm/1_helm.md b/docs/installation/helm/1_helm.md index 00fe4fdcaf..57de4ca56e 100644 --- a/docs/installation/helm/1_helm.md +++ b/docs/installation/helm/1_helm.md @@ -16,8 +16,8 @@ helm repo add dendrite https://matrix-org.github.io/dendrite/ helm repo update ``` -Next you'll need to create a `values.yaml` file and configure it to your liking. All possible values can be found -[here](https://github.com/matrix-org/dendrite/blob/main/helm/dendrite/values.yaml), but at least you need to configure +Next you'll need to create a `values.yaml` file and configure it to your liking. All possible values can be found +[here](https://github.com/element-hq/dendrite/blob/main/helm/dendrite/values.yaml), but at least you need to configure a `server_name`, otherwise the chart will complain about it: ```yaml @@ -55,4 +55,4 @@ dendrite_config: server_name: "localhost" ``` -Using this option, the `database.connection_string` will be set for you automatically. \ No newline at end of file +Using this option, the `database.connection_string` will be set for you automatically. diff --git a/docs/installation/manual/4_configuration.md b/docs/installation/manual/4_configuration.md index 624cc4155f..23069799c6 100644 --- a/docs/installation/manual/4_configuration.md +++ b/docs/installation/manual/4_configuration.md @@ -11,7 +11,7 @@ permalink: /installation/manual/configuration A YAML configuration file is used to configure Dendrite. A sample configuration file is present in the top level of the Dendrite repository: -* [`dendrite-sample.yaml`](https://github.com/matrix-org/dendrite/blob/main/dendrite-sample.yaml) +* [`dendrite-sample.yaml`](https://github.com/element-hq/dendrite/blob/main/dendrite-sample.yaml) You will need to duplicate the sample, calling it `dendrite.yaml` for example, and then tailor it to your installation. At a minimum, you will need to populate the following @@ -81,7 +81,7 @@ one address in the `addresses` field. ## Database connection using a global connection pool -If you want to use a single connection pool to a single PostgreSQL database, +If you want to use a single connection pool to a single PostgreSQL database, then you must uncomment and configure the `database` section within the `global` section: ```yaml @@ -103,9 +103,9 @@ these will override the `global` database configuration. Dendrite supports full-text indexing using [Bleve](https://github.com/blevesearch/bleve). It is configured in the `sync_api` section as follows. -Depending on the language most likely to be used on the server, it might make sense to change the `language` used when indexing, -to ensure the returned results match the expectations. A full list of possible languages -can be found [here](https://github.com/matrix-org/dendrite/blob/5b73592f5a4dddf64184fcbe33f4c1835c656480/internal/fulltext/bleve.go#L25-L46). +Depending on the language most likely to be used on the server, it might make sense to change the `language` used when indexing, +to ensure the returned results match the expectations. A full list of possible languages +can be found [here](https://github.com/element-hq/dendrite/blob/5b73592f5a4dddf64184fcbe33f4c1835c656480/internal/fulltext/bleve.go#L25-L46). ```yaml sync_api: diff --git a/federationapi/api/api.go b/federationapi/api/api.go index efe0547df0..0a40554362 100644 --- a/federationapi/api/api.go +++ b/federationapi/api/api.go @@ -10,8 +10,8 @@ import ( "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/federationapi/types" - rstypes "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/federationapi/types" + rstypes "github.com/element-hq/dendrite/roomserver/types" ) // FederationInternalAPI is used to query information from the federation sender. diff --git a/federationapi/consumers/keychange.go b/federationapi/consumers/keychange.go index 6210bddb6f..10edea8e6c 100644 --- a/federationapi/consumers/keychange.go +++ b/federationapi/consumers/keychange.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -24,14 +16,14 @@ import ( "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/federationapi/types" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/federationapi/types" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/userapi/api" ) // KeyChangeConsumer consumes events that originate in key server. diff --git a/federationapi/consumers/presence.go b/federationapi/consumers/presence.go index dd100bc08d..9f8bb8f259 100644 --- a/federationapi/consumers/presence.go +++ b/federationapi/consumers/presence.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -19,14 +11,14 @@ import ( "encoding/json" "strconv" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/storage" - fedTypes "github.com/matrix-org/dendrite/federationapi/types" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/storage" + fedTypes "github.com/element-hq/dendrite/federationapi/types" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/federationapi/consumers/receipts.go b/federationapi/consumers/receipts.go index 1407a88b77..c123402827 100644 --- a/federationapi/consumers/receipts.go +++ b/federationapi/consumers/receipts.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -19,14 +11,14 @@ import ( "encoding/json" "strconv" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/storage" + fedTypes "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + syncTypes "github.com/element-hq/dendrite/syncapi/types" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/storage" - fedTypes "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - syncTypes "github.com/matrix-org/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" diff --git a/federationapi/consumers/roomserver.go b/federationapi/consumers/roomserver.go index f1dcb11759..a0442ce908 100644 --- a/federationapi/consumers/roomserver.go +++ b/federationapi/consumers/roomserver.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -23,7 +15,7 @@ import ( "strconv" "time" - syncAPITypes "github.com/matrix-org/dendrite/syncapi/types" + syncAPITypes "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/gomatrixserverlib" @@ -31,13 +23,13 @@ import ( "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" ) // OutputRoomEventConsumer consumes events that originated in the room server. diff --git a/federationapi/consumers/roomserver_test.go b/federationapi/consumers/roomserver_test.go index bb659b9cd9..1acaba03c0 100644 --- a/federationapi/consumers/roomserver_test.go +++ b/federationapi/consumers/roomserver_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers diff --git a/federationapi/consumers/sendtodevice.go b/federationapi/consumers/sendtodevice.go index 91b28cdbfb..4f86b8cbeb 100644 --- a/federationapi/consumers/sendtodevice.go +++ b/federationapi/consumers/sendtodevice.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -25,12 +17,12 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - syncTypes "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + syncTypes "github.com/element-hq/dendrite/syncapi/types" ) // OutputSendToDeviceConsumer consumes events that originate in the clientapi. diff --git a/federationapi/consumers/typing.go b/federationapi/consumers/typing.go index 134f2174f3..6727d28ce8 100644 --- a/federationapi/consumers/typing.go +++ b/federationapi/consumers/typing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -19,11 +11,11 @@ import ( "encoding/json" "strconv" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" diff --git a/federationapi/federationapi.go b/federationapi/federationapi.go index d3730c7cad..075f673db7 100644 --- a/federationapi/federationapi.go +++ b/federationapi/federationapi.go @@ -1,44 +1,36 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package federationapi import ( "time" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/sirupsen/logrus" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/consumers" - "github.com/matrix-org/dendrite/federationapi/internal" - "github.com/matrix-org/dendrite/federationapi/producers" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/internal/caching" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/jetstream" - userapi "github.com/matrix-org/dendrite/userapi/api" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/consumers" + "github.com/element-hq/dendrite/federationapi/internal" + "github.com/element-hq/dendrite/federationapi/producers" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/internal/caching" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/jetstream" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" - "github.com/matrix-org/dendrite/federationapi/routing" + "github.com/element-hq/dendrite/federationapi/routing" ) // AddPublicRoutes sets up and registers HTTP handlers on the base API muxes for the FederationAPI component. diff --git a/federationapi/federationapi_keys_test.go b/federationapi/federationapi_keys_test.go index 9dda389ed9..4d5b2b68f8 100644 --- a/federationapi/federationapi_keys_test.go +++ b/federationapi/federationapi_keys_test.go @@ -12,17 +12,17 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/routing" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/routing" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/setup/config" ) type server struct { diff --git a/federationapi/federationapi_test.go b/federationapi/federationapi_test.go index 79f4b3f214..3d4faad59f 100644 --- a/federationapi/federationapi_test.go +++ b/federationapi/federationapi_test.go @@ -12,10 +12,10 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/federationapi/routing" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/routing" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" @@ -25,15 +25,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/internal" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/internal" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + userapi "github.com/element-hq/dendrite/userapi/api" ) type fedRoomserverAPI struct { diff --git a/federationapi/internal/api.go b/federationapi/internal/api.go index 67388a102c..809cf20467 100644 --- a/federationapi/internal/api.go +++ b/federationapi/internal/api.go @@ -7,14 +7,14 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/federationapi/storage/cache" - "github.com/matrix-org/dendrite/internal/caching" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/federationapi/storage/cache" + "github.com/element-hq/dendrite/internal/caching" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" diff --git a/federationapi/internal/federationclient_test.go b/federationapi/internal/federationclient_test.go index 47efb11da3..87842a466d 100644 --- a/federationapi/internal/federationclient_test.go +++ b/federationapi/internal/federationclient_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -19,11 +11,11 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/federationapi/internal/perform.go b/federationapi/internal/perform.go index 0200cf69b3..8797d5d186 100644 --- a/federationapi/internal/perform.go +++ b/federationapi/internal/perform.go @@ -15,12 +15,12 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/consumers" - "github.com/matrix-org/dendrite/federationapi/statistics" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/roomserver/version" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/consumers" + "github.com/element-hq/dendrite/federationapi/statistics" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/version" ) // PerformLeaveRequest implements api.FederationInternalAPI diff --git a/federationapi/internal/perform_test.go b/federationapi/internal/perform_test.go index 82f9b9db1b..424cf559da 100644 --- a/federationapi/internal/perform_test.go +++ b/federationapi/internal/perform_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -19,12 +11,12 @@ import ( "crypto/ed25519" "testing" - "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/queue" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/queue" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/federationapi/internal/query.go b/federationapi/internal/query.go index 21e77c48d9..22b1eb44d0 100644 --- a/federationapi/internal/query.go +++ b/federationapi/internal/query.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/federationapi/producers/syncapi.go b/federationapi/producers/syncapi.go index ede56436a5..b7192f80e1 100644 --- a/federationapi/producers/syncapi.go +++ b/federationapi/producers/syncapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package producers @@ -26,10 +18,10 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) // SyncAPIProducer produces events for the sync API server to consume diff --git a/federationapi/queue/destinationqueue.go b/federationapi/queue/destinationqueue.go index be43aaf1c7..136ad5098b 100644 --- a/federationapi/queue/destinationqueue.go +++ b/federationapi/queue/destinationqueue.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package queue @@ -28,11 +20,11 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/process" ) const ( diff --git a/federationapi/queue/queue.go b/federationapi/queue/queue.go index 892c26a2cc..589faea0b1 100644 --- a/federationapi/queue/queue.go +++ b/federationapi/queue/queue.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package queue @@ -28,11 +20,11 @@ import ( "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/process" ) // OutgoingQueues is a collection of queues for sending transactions to other diff --git a/federationapi/queue/queue_test.go b/federationapi/queue/queue_test.go index 7d21a3bb3f..7a3ad079b9 100644 --- a/federationapi/queue/queue_test.go +++ b/federationapi/queue/queue_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package queue @@ -22,9 +14,9 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/test/testrig" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/test/testrig" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "gotest.tools/v3/poll" @@ -32,12 +24,12 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/stretchr/testify/assert" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/test" ) func mustCreateFederationDatabase(t *testing.T, dbType test.DBType, realDatabase bool) (storage.Database, *process.ProcessContext, func()) { diff --git a/federationapi/routing/backfill.go b/federationapi/routing/backfill.go index bc41388397..945975d6fa 100644 --- a/federationapi/routing/backfill.go +++ b/federationapi/routing/backfill.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,9 +12,9 @@ import ( "strconv" "time" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/devices.go b/federationapi/routing/devices.go index a54ff0d9cd..4c186dc67d 100644 --- a/federationapi/routing/devices.go +++ b/federationapi/routing/devices.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -16,7 +9,7 @@ import ( "encoding/json" "net/http" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/eventauth.go b/federationapi/routing/eventauth.go index 2be3ecdb1d..9738484e42 100644 --- a/federationapi/routing/eventauth.go +++ b/federationapi/routing/eventauth.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -16,8 +9,8 @@ import ( "context" "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/federationapi/routing/events.go b/federationapi/routing/events.go index f4659f5285..d68208a4f9 100644 --- a/federationapi/routing/events.go +++ b/federationapi/routing/events.go @@ -1,16 +1,7 @@ -// Copyright 2017 New Vector Ltd +// Copyright 2017-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,7 +11,7 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/invite.go b/federationapi/routing/invite.go index 76fadaa93e..43f515864d 100644 --- a/federationapi/routing/invite.go +++ b/federationapi/routing/invite.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,9 +13,9 @@ import ( "fmt" "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/join.go b/federationapi/routing/join.go index ce7ad30ff7..6b2c1a9b7f 100644 --- a/federationapi/routing/join.go +++ b/federationapi/routing/join.go @@ -1,16 +1,7 @@ -// Copyright 2017 New Vector Ltd +// Copyright 2017-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -27,10 +18,10 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" ) // MakeJoin implements the /make_join API diff --git a/federationapi/routing/keys.go b/federationapi/routing/keys.go index 38a88e4b16..10f26a12b3 100644 --- a/federationapi/routing/keys.go +++ b/federationapi/routing/keys.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,10 +11,10 @@ import ( "net/http" "time" - clienthttputil "github.com/matrix-org/dendrite/clientapi/httputil" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/api" + clienthttputil "github.com/element-hq/dendrite/clientapi/httputil" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/leave.go b/federationapi/routing/leave.go index 7c86ba69bd..5e32068124 100644 --- a/federationapi/routing/leave.go +++ b/federationapi/routing/leave.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -17,10 +10,10 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/missingevents.go b/federationapi/routing/missingevents.go index b1cefe7b4c..fc0e911216 100644 --- a/federationapi/routing/missingevents.go +++ b/federationapi/routing/missingevents.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -16,8 +9,8 @@ import ( "encoding/json" "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/federationapi/routing/openid.go b/federationapi/routing/openid.go index d28f319f57..af3506b2d6 100644 --- a/federationapi/routing/openid.go +++ b/federationapi/routing/openid.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,7 +10,7 @@ import ( "net/http" "time" - userapi "github.com/matrix-org/dendrite/userapi/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/federationapi/routing/peek.go b/federationapi/routing/peek.go index f5003b147d..580858d801 100644 --- a/federationapi/routing/peek.go +++ b/federationapi/routing/peek.go @@ -1,25 +1,16 @@ -// Copyright 2020 New Vector Ltd +// Copyright 2020-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/profile.go b/federationapi/routing/profile.go index e8c7ff793d..f4826c181e 100644 --- a/federationapi/routing/profile.go +++ b/federationapi/routing/profile.go @@ -1,16 +1,7 @@ -// Copyright 2017 New Vector Ltd +// Copyright 2017-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,10 +10,10 @@ import ( "fmt" "net/http" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/federationapi/routing/profile_test.go b/federationapi/routing/profile_test.go index ba13e07fc9..96482b5c6b 100644 --- a/federationapi/routing/profile_test.go +++ b/federationapi/routing/profile_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing_test @@ -22,18 +14,18 @@ import ( "net/url" "testing" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + fedAPI "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/federationapi/routing" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + userAPI "github.com/element-hq/dendrite/userapi/api" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - fedAPI "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/federationapi/routing" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - userAPI "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/publicrooms.go b/federationapi/routing/publicrooms.go index 213d1631a5..ed204be157 100644 --- a/federationapi/routing/publicrooms.go +++ b/federationapi/routing/publicrooms.go @@ -11,8 +11,8 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/httputil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/clientapi/httputil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" ) type PublicRoomReq struct { diff --git a/federationapi/routing/query.go b/federationapi/routing/query.go index dac9b1b34c..7c906bb76d 100644 --- a/federationapi/routing/query.go +++ b/federationapi/routing/query.go @@ -1,16 +1,7 @@ -// Copyright 2017 New Vector Ltd +// Copyright 2017-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,10 +9,10 @@ import ( "fmt" "net/http" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" diff --git a/federationapi/routing/query_test.go b/federationapi/routing/query_test.go index fd0894d15c..27ef4c6a4c 100644 --- a/federationapi/routing/query_test.go +++ b/federationapi/routing/query_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing_test @@ -22,16 +14,16 @@ import ( "net/url" "testing" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + fedAPI "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/federationapi/routing" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - fedAPI "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/federationapi/routing" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/routing.go b/federationapi/routing/routing.go index 91718efdb3..5043722e85 100644 --- a/federationapi/routing/routing.go +++ b/federationapi/routing/routing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -22,16 +14,16 @@ import ( "sync" "time" + fedInternal "github.com/element-hq/dendrite/federationapi/internal" + "github.com/element-hq/dendrite/federationapi/producers" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/roomserver/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/getsentry/sentry-go" "github.com/gorilla/mux" - fedInternal "github.com/matrix-org/dendrite/federationapi/internal" - "github.com/matrix-org/dendrite/federationapi/producers" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/roomserver/api" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 9666945414..0764627850 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -25,11 +17,11 @@ import ( "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/federationapi/producers" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - userAPI "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/federationapi/producers" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + userAPI "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/routing/send_test.go b/federationapi/routing/send_test.go index ff4f7bd065..c20a9d5928 100644 --- a/federationapi/routing/send_test.go +++ b/federationapi/routing/send_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing_test @@ -20,16 +12,16 @@ import ( "net/http/httptest" "testing" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + fedAPI "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/federationapi/routing" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - fedAPI "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/federationapi/routing" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/state.go b/federationapi/routing/state.go index d109105733..03dd8a0c07 100644 --- a/federationapi/routing/state.go +++ b/federationapi/routing/state.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -17,8 +10,8 @@ import ( "net/http" "net/url" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/federationapi/routing/threepid.go b/federationapi/routing/threepid.go index 42ba8bfe52..4e3dfdd517 100644 --- a/federationapi/routing/threepid.go +++ b/federationapi/routing/threepid.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,11 +13,11 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/federationapi/routing/version.go b/federationapi/routing/version.go index 906fc2b9b8..b9e7e8043c 100644 --- a/federationapi/routing/version.go +++ b/federationapi/routing/version.go @@ -1,23 +1,14 @@ -// Copyright 2017 New Vector Ltd +// Copyright 2017-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing import ( "net/http" - "github.com/matrix-org/dendrite/internal" + "github.com/element-hq/dendrite/internal" "github.com/matrix-org/util" ) diff --git a/federationapi/statistics/statistics.go b/federationapi/statistics/statistics.go index 750c57fd7f..92aa92917e 100644 --- a/federationapi/statistics/statistics.go +++ b/federationapi/statistics/statistics.go @@ -10,7 +10,7 @@ import ( "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/federationapi/storage" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/statistics/statistics_test.go b/federationapi/statistics/statistics_test.go index 4376a90500..aeab42fb5f 100644 --- a/federationapi/statistics/statistics_test.go +++ b/federationapi/statistics/statistics_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" ) diff --git a/federationapi/storage/cache/keydb.go b/federationapi/storage/cache/keydb.go index d63c889d56..6bba85fa79 100644 --- a/federationapi/storage/cache/keydb.go +++ b/federationapi/storage/cache/keydb.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/matrix-org/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/caching" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/interface.go b/federationapi/storage/interface.go index 5388b4d2be..cba701f864 100644 --- a/federationapi/storage/interface.go +++ b/federationapi/storage/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -21,9 +13,9 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/federationapi/types" - rstypes "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/federationapi/types" + rstypes "github.com/element-hq/dendrite/roomserver/types" ) type Database interface { diff --git a/federationapi/storage/postgres/assumed_offline_table.go b/federationapi/storage/postgres/assumed_offline_table.go index d8d389d866..6cc29391b4 100644 --- a/federationapi/storage/postgres/assumed_offline_table.go +++ b/federationapi/storage/postgres/assumed_offline_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,7 +10,7 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/blacklist_table.go b/federationapi/storage/postgres/blacklist_table.go index 48b6d72e1e..02bb8c981f 100644 --- a/federationapi/storage/postgres/blacklist_table.go +++ b/federationapi/storage/postgres/blacklist_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,7 +10,7 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/deltas/2021020411080000_rooms.go b/federationapi/storage/postgres/deltas/2021020411080000_rooms.go index fc894846d2..7c247e0c34 100644 --- a/federationapi/storage/postgres/deltas/2021020411080000_rooms.go +++ b/federationapi/storage/postgres/deltas/2021020411080000_rooms.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/federationapi/storage/postgres/deltas/2022042812473400_addexpiresat.go b/federationapi/storage/postgres/deltas/2022042812473400_addexpiresat.go index cf2d94b205..dfeb5479f5 100644 --- a/federationapi/storage/postgres/deltas/2022042812473400_addexpiresat.go +++ b/federationapi/storage/postgres/deltas/2022042812473400_addexpiresat.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/federationapi/storage/postgres/inbound_peeks_table.go b/federationapi/storage/postgres/inbound_peeks_table.go index a6fffc0e12..3fe988f4f8 100644 --- a/federationapi/storage/postgres/inbound_peeks_table.go +++ b/federationapi/storage/postgres/inbound_peeks_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/joined_hosts_table.go b/federationapi/storage/postgres/joined_hosts_table.go index 2b0aebad1f..4e6fed7ae5 100644 --- a/federationapi/storage/postgres/joined_hosts_table.go +++ b/federationapi/storage/postgres/joined_hosts_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/notary_server_keys_json_table.go b/federationapi/storage/postgres/notary_server_keys_json_table.go index af98a0d4e0..a21259136d 100644 --- a/federationapi/storage/postgres/notary_server_keys_json_table.go +++ b/federationapi/storage/postgres/notary_server_keys_json_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,8 +10,8 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/notary_server_keys_metadata_table.go b/federationapi/storage/postgres/notary_server_keys_metadata_table.go index 47aa82b48f..87bff12962 100644 --- a/federationapi/storage/postgres/notary_server_keys_metadata_table.go +++ b/federationapi/storage/postgres/notary_server_keys_metadata_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "database/sql" "encoding/json" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/outbound_peeks_table.go b/federationapi/storage/postgres/outbound_peeks_table.go index bd2b10e674..02e1f1f872 100644 --- a/federationapi/storage/postgres/outbound_peeks_table.go +++ b/federationapi/storage/postgres/outbound_peeks_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/queue_edus_table.go b/federationapi/storage/postgres/queue_edus_table.go index 7c57ed0cc4..2767c520de 100644 --- a/federationapi/storage/postgres/queue_edus_table.go +++ b/federationapi/storage/postgres/queue_edus_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,9 +12,9 @@ import ( "github.com/lib/pq" - "github.com/matrix-org/dendrite/federationapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/queue_json_table.go b/federationapi/storage/postgres/queue_json_table.go index f92e33d5eb..ef0d9eab5d 100644 --- a/federationapi/storage/postgres/queue_json_table.go +++ b/federationapi/storage/postgres/queue_json_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,9 +10,9 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" ) const queueJSONSchema = ` diff --git a/federationapi/storage/postgres/queue_pdus_table.go b/federationapi/storage/postgres/queue_pdus_table.go index a767ec41d7..7748d9ca3d 100644 --- a/federationapi/storage/postgres/queue_pdus_table.go +++ b/federationapi/storage/postgres/queue_pdus_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,9 +10,9 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/relay_servers_table.go b/federationapi/storage/postgres/relay_servers_table.go index 1a47816e2f..0a02cf9197 100644 --- a/federationapi/storage/postgres/relay_servers_table.go +++ b/federationapi/storage/postgres/relay_servers_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,9 +10,9 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/server_key_table.go b/federationapi/storage/postgres/server_key_table.go index fa58f1ea2d..656ffd6845 100644 --- a/federationapi/storage/postgres/server_key_table.go +++ b/federationapi/storage/postgres/server_key_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/postgres/storage.go b/federationapi/storage/postgres/storage.go index 2caa7a0552..4a5fc97770 100644 --- a/federationapi/storage/postgres/storage.go +++ b/federationapi/storage/postgres/storage.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/federationapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/federationapi/storage/shared" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/federationapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/federationapi/storage/shared" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/shared/receipt/receipt.go b/federationapi/storage/shared/receipt/receipt.go index b347269c18..71613ba34b 100644 --- a/federationapi/storage/shared/receipt/receipt.go +++ b/federationapi/storage/shared/receipt/receipt.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // A Receipt contains the NIDs of a call to GetNextTransactionPDUs/EDUs. // We don't actually export the NIDs but we need the caller to be able // to pass them back so that we can clean up if the transaction sends diff --git a/federationapi/storage/shared/storage.go b/federationapi/storage/shared/storage.go index 8c73967c6f..19b870b273 100644 --- a/federationapi/storage/shared/storage.go +++ b/federationapi/storage/shared/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared @@ -20,11 +12,11 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/shared/storage_edus.go b/federationapi/storage/shared/storage_edus.go index e8d1d37336..2dbed8813c 100644 --- a/federationapi/storage/shared/storage_edus.go +++ b/federationapi/storage/shared/storage_edus.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared @@ -22,7 +14,7 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/shared/storage_keys.go b/federationapi/storage/shared/storage_keys.go index 580cf1d847..630984f15a 100644 --- a/federationapi/storage/shared/storage_keys.go +++ b/federationapi/storage/shared/storage_keys.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared diff --git a/federationapi/storage/shared/storage_pdus.go b/federationapi/storage/shared/storage_pdus.go index 5fabfbf204..93434e3b2f 100644 --- a/federationapi/storage/shared/storage_pdus.go +++ b/federationapi/storage/shared/storage_pdus.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared @@ -21,8 +13,8 @@ import ( "errors" "fmt" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/assumed_offline_table.go b/federationapi/storage/sqlite3/assumed_offline_table.go index f8de7f0c57..8dcd838eda 100644 --- a/federationapi/storage/sqlite3/assumed_offline_table.go +++ b/federationapi/storage/sqlite3/assumed_offline_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,7 +10,7 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/blacklist_table.go b/federationapi/storage/sqlite3/blacklist_table.go index 2c65c487cb..60f421d7c4 100644 --- a/federationapi/storage/sqlite3/blacklist_table.go +++ b/federationapi/storage/sqlite3/blacklist_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,7 +10,7 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/deltas/2021020411080000_rooms.go b/federationapi/storage/sqlite3/deltas/2021020411080000_rooms.go index fc894846d2..7c247e0c34 100644 --- a/federationapi/storage/sqlite3/deltas/2021020411080000_rooms.go +++ b/federationapi/storage/sqlite3/deltas/2021020411080000_rooms.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/federationapi/storage/sqlite3/deltas/2022042812473400_addexpiresat.go b/federationapi/storage/sqlite3/deltas/2022042812473400_addexpiresat.go index d8be4695ee..e4a04f60f5 100644 --- a/federationapi/storage/sqlite3/deltas/2022042812473400_addexpiresat.go +++ b/federationapi/storage/sqlite3/deltas/2022042812473400_addexpiresat.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/federationapi/storage/sqlite3/inbound_peeks_table.go b/federationapi/storage/sqlite3/inbound_peeks_table.go index e58d537781..aa449c9ade 100644 --- a/federationapi/storage/sqlite3/inbound_peeks_table.go +++ b/federationapi/storage/sqlite3/inbound_peeks_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,9 +11,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/joined_hosts_table.go b/federationapi/storage/sqlite3/joined_hosts_table.go index 4181943125..feba74288c 100644 --- a/federationapi/storage/sqlite3/joined_hosts_table.go +++ b/federationapi/storage/sqlite3/joined_hosts_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,9 +12,9 @@ import ( "database/sql" "strings" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/notary_server_keys_json_table.go b/federationapi/storage/sqlite3/notary_server_keys_json_table.go index ad6d1b57fe..9972765d1c 100644 --- a/federationapi/storage/sqlite3/notary_server_keys_json_table.go +++ b/federationapi/storage/sqlite3/notary_server_keys_json_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,8 +10,8 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/notary_server_keys_metadata_table.go b/federationapi/storage/sqlite3/notary_server_keys_metadata_table.go index d9b98fc4f3..2dba53e7d6 100644 --- a/federationapi/storage/sqlite3/notary_server_keys_metadata_table.go +++ b/federationapi/storage/sqlite3/notary_server_keys_metadata_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,9 +13,9 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/outbound_peeks_table.go b/federationapi/storage/sqlite3/outbound_peeks_table.go index b6684e9b3b..b0a442b4b3 100644 --- a/federationapi/storage/sqlite3/outbound_peeks_table.go +++ b/federationapi/storage/sqlite3/outbound_peeks_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,9 +11,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/queue_edus_table.go b/federationapi/storage/sqlite3/queue_edus_table.go index f500a63179..331db83ca8 100644 --- a/federationapi/storage/sqlite3/queue_edus_table.go +++ b/federationapi/storage/sqlite3/queue_edus_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,9 +12,9 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/queue_json_table.go b/federationapi/storage/sqlite3/queue_json_table.go index 33ae061314..ddf009faa0 100644 --- a/federationapi/storage/sqlite3/queue_json_table.go +++ b/federationapi/storage/sqlite3/queue_json_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,8 +13,8 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" ) const queueJSONSchema = ` diff --git a/federationapi/storage/sqlite3/queue_pdus_table.go b/federationapi/storage/sqlite3/queue_pdus_table.go index 92075ff903..9eb67077f0 100644 --- a/federationapi/storage/sqlite3/queue_pdus_table.go +++ b/federationapi/storage/sqlite3/queue_pdus_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,8 +13,8 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/relay_servers_table.go b/federationapi/storage/sqlite3/relay_servers_table.go index 232db32af8..ee83167df0 100644 --- a/federationapi/storage/sqlite3/relay_servers_table.go +++ b/federationapi/storage/sqlite3/relay_servers_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,8 +11,8 @@ import ( "database/sql" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/server_key_table.go b/federationapi/storage/sqlite3/server_key_table.go index 65a854ce12..310c12ed0b 100644 --- a/federationapi/storage/sqlite3/server_key_table.go +++ b/federationapi/storage/sqlite3/server_key_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,7 +12,7 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/sqlite3/storage.go b/federationapi/storage/sqlite3/storage.go index 524bf1d5b4..c0a06d1205 100644 --- a/federationapi/storage/sqlite3/storage.go +++ b/federationapi/storage/sqlite3/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,11 +10,11 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/federationapi/storage/shared" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/federationapi/storage/shared" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/storage.go b/federationapi/storage/storage.go index f926b62e73..abe4addb03 100644 --- a/federationapi/storage/storage.go +++ b/federationapi/storage/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm @@ -21,11 +13,11 @@ import ( "context" "fmt" - "github.com/matrix-org/dendrite/federationapi/storage/postgres" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/federationapi/storage/postgres" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/storage_test.go b/federationapi/storage/storage_test.go index db71f2c13c..416e7e12f8 100644 --- a/federationapi/storage/storage_test.go +++ b/federationapi/storage/storage_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/federationapi/storage" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/storage" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/federationapi/storage/storage_wasm.go b/federationapi/storage/storage_wasm.go index e19a45642f..9f630f37d5 100644 --- a/federationapi/storage/storage_wasm.go +++ b/federationapi/storage/storage_wasm.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -18,10 +10,10 @@ import ( "context" "fmt" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/federationapi/storage/tables/inbound_peeks_table_test.go b/federationapi/storage/tables/inbound_peeks_table_test.go index e5d898b3a5..36f9ad4b8d 100644 --- a/federationapi/storage/tables/inbound_peeks_table_test.go +++ b/federationapi/storage/tables/inbound_peeks_table_test.go @@ -5,12 +5,12 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/federationapi/storage/postgres" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/storage/postgres" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/stretchr/testify/assert" diff --git a/federationapi/storage/tables/interface.go b/federationapi/storage/tables/interface.go index f8de42da79..2173a93f28 100644 --- a/federationapi/storage/tables/interface.go +++ b/federationapi/storage/tables/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package tables @@ -18,7 +10,7 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/federationapi/types" + "github.com/element-hq/dendrite/federationapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/federationapi/storage/tables/outbound_peeks_table_test.go b/federationapi/storage/tables/outbound_peeks_table_test.go index a460af09d6..d7fb076765 100644 --- a/federationapi/storage/tables/outbound_peeks_table_test.go +++ b/federationapi/storage/tables/outbound_peeks_table_test.go @@ -5,12 +5,12 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/federationapi/storage/postgres" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/storage/postgres" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" "github.com/stretchr/testify/assert" diff --git a/federationapi/storage/tables/relay_servers_table_test.go b/federationapi/storage/tables/relay_servers_table_test.go index 6a14e3f16d..71013e0761 100644 --- a/federationapi/storage/tables/relay_servers_table_test.go +++ b/federationapi/storage/tables/relay_servers_table_test.go @@ -5,12 +5,12 @@ import ( "database/sql" "testing" - "github.com/matrix-org/dendrite/federationapi/storage/postgres" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/storage/postgres" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" ) diff --git a/federationapi/storage/tables/server_key_table_test.go b/federationapi/storage/tables/server_key_table_test.go index e79a086b88..322169bd00 100644 --- a/federationapi/storage/tables/server_key_table_test.go +++ b/federationapi/storage/tables/server_key_table_test.go @@ -5,12 +5,12 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/federationapi/storage/postgres" - "github.com/matrix-org/dendrite/federationapi/storage/sqlite3" - "github.com/matrix-org/dendrite/federationapi/storage/tables" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/federationapi/storage/postgres" + "github.com/element-hq/dendrite/federationapi/storage/sqlite3" + "github.com/element-hq/dendrite/federationapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/federationapi/types/types.go b/federationapi/types/types.go index 20f92e804b..2dd703162c 100644 --- a/federationapi/types/types.go +++ b/federationapi/types/types.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package types diff --git a/go.mod b/go.mod index 4add5ae1ad..b2d3cbfcc8 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/matrix-org/dendrite +module github.com/element-hq/dendrite require ( github.com/Arceliar/phony v0.0.0-20220903101357-530938a4b13d @@ -37,19 +37,20 @@ require ( github.com/prometheus/client_golang v1.19.1 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 - github.com/tidwall/gjson v1.17.0 + github.com/tidwall/gjson v1.18.0 github.com/tidwall/sjson v1.2.5 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-lib v2.4.1+incompatible github.com/yggdrasil-network/yggdrasil-go v0.5.6 github.com/yggdrasil-network/yggquic v0.0.0-20240802104827-b4e97a928967 go.uber.org/atomic v1.11.0 - golang.org/x/crypto v0.27.0 + golang.org/x/crypto v0.28.0 golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 golang.org/x/image v0.18.0 golang.org/x/mobile v0.0.0-20240520174638-fa72addaaa1b - golang.org/x/sync v0.8.0 - golang.org/x/term v0.24.0 + golang.org/x/net v0.29.0 + golang.org/x/sync v0.9.0 + golang.org/x/term v0.25.0 gopkg.in/h2non/bimg.v1 v1.1.9 gopkg.in/yaml.v2 v2.4.0 gotest.tools/v3 v3.4.0 @@ -110,7 +111,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/minio/highwayhash v1.0.3 // indirect - github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect + github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect @@ -128,24 +129,25 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/quic-go v0.45.2 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/rs/zerolog v1.29.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/time v0.6.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/tools v0.22.0 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/macaroon.v2 v2.1.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect maunium.net/go/maulogger/v2 v2.4.1 // indirect @@ -157,4 +159,6 @@ require ( modernc.org/token v1.1.0 // indirect ) -go 1.21.0 +go 1.22 + +toolchain go1.23.2 diff --git a/go.sum b/go.sum index b64125e3c5..ad1b8164fb 100644 --- a/go.sum +++ b/go.sum @@ -74,7 +74,6 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cretz/bine v0.2.0 h1:8GiDRGlTgz+o8H9DSnsl+5MeBK4HsExxgl6WgzOCuZo= github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbetI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -177,7 +176,6 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/gologme/log v1.3.0 h1:l781G4dE+pbigClDSDzSaaYKtiueHCILUa/qSDsmHAo= github.com/gologme/log v1.3.0/go.mod h1:yKT+DvIPdDdDoPtqFrFxheooyVmoqi0BAsw+erN3wA4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -193,8 +191,8 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= @@ -254,8 +252,8 @@ github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -298,7 +296,6 @@ github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwb github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -315,15 +312,14 @@ github.com/quic-go/quic-go v0.45.2 h1:DfqBmqjb4ExSdxRIb/+qXhPC+7k6+DUNZha4oeiC9f github.com/quic-go/quic-go v0.45.2/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= @@ -336,8 +332,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.17.0 h1:/Jocvlh98kcTfpN2+JzGQWQcqrPQwDrVEMApx/M5ZwM= -github.com/tidwall/gjson v1.17.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -367,18 +363,18 @@ go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 h1:IJFEoHiytixx8cMiVAO+GmHR6Frwu+u5Ur8njpFO6Ac= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0/go.mod h1:3rHrKNtLIoS0oZwkY2vxi+oJcwFRWdtUyRII+so45p8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 h1:cMyu9O88joYEaI47CnQkxO1XZdpoTF9fEnW2duIddhw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0/go.mod h1:6Am3rn7P9TVVeXYG+wtcGE7IE1tsQ+bP3AuWcKt/gOI= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= @@ -394,8 +390,8 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -416,9 +412,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -429,15 +424,15 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -449,7 +444,6 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -463,16 +457,16 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -482,15 +476,14 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -498,8 +491,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -508,16 +501,16 @@ gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJ gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -535,7 +528,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= maunium.net/go/maulogger/v2 v2.4.1 h1:N7zSdd0mZkB2m2JtFUsiGTQQAdP0YeFWT7YMc80yAL8= diff --git a/helm/dendrite/Chart.yaml b/helm/dendrite/Chart.yaml index 9613b50455..6f4a9825c3 100644 --- a/helm/dendrite/Chart.yaml +++ b/helm/dendrite/Chart.yaml @@ -10,9 +10,9 @@ keywords: - chat - homeserver - dendrite -home: https://github.com/matrix-org/dendrite +home: https://github.com/element-hq/dendrite sources: - - https://github.com/matrix-org/dendrite + - https://github.com/element-hq/dendrite dependencies: - name: postgresql version: 14.2.3 diff --git a/helm/dendrite/README.md b/helm/dendrite/README.md index a5b03aa859..9973c90bcb 100644 --- a/helm/dendrite/README.md +++ b/helm/dendrite/README.md @@ -32,7 +32,7 @@ Create a folder `appservices` and place your configurations in there. The confi ## Source Code -* +* ## Requirements | Repository | Name | Version | @@ -42,7 +42,7 @@ Create a folder `appservices` and place your configurations in there. The confi | Key | Type | Default | Description | |-----|------|---------|-------------| -| image.repository | string | `"ghcr.io/matrix-org/dendrite-monolith"` | Docker repository/image to use | +| image.repository | string | `"ghcr.io/element-hq/dendrite-monolith"` | Docker repository/image to use | | image.pullPolicy | string | `"IfNotPresent"` | Kubernetes pullPolicy | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | | imagePullSecrets | list | `[]` | Configure image pull secrets to use private container registry https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret | @@ -135,7 +135,7 @@ Create a folder `appservices` and place your configurations in there. The confi | dendrite_config.sync_api.search | object | `{"enabled":true,"index_path":"/data/search","language":"en"}` | Configuration for the full-text search engine. | | dendrite_config.sync_api.search.enabled | bool | `true` | Whether fulltext search is enabled. | | dendrite_config.sync_api.search.index_path | string | `"/data/search"` | The path to store the search index in. | -| dendrite_config.sync_api.search.language | string | `"en"` | The language most likely to be used on the server - used when indexing, to ensure the returned results match expectations. A full list of possible languages can be found [here](https://github.com/matrix-org/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46) | +| dendrite_config.sync_api.search.language | string | `"en"` | The language most likely to be used on the server - used when indexing, to ensure the returned results match expectations. A full list of possible languages can be found [here](https://github.com/element-hq/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46) | | dendrite_config.user_api.bcrypt_cost | int | `10` | bcrypt cost to use when hashing passwords. (ranges from 4-31; 4 being least secure, 31 being most secure; _NOTE: Using a too high value can cause clients to timeout and uses more CPU._) | | dendrite_config.user_api.openid_token_lifetime_ms | int | `3600000` | OpenID Token lifetime in milliseconds. | | dendrite_config.user_api.push_gateway_disable_tls_validation | bool | `false` | | @@ -191,4 +191,4 @@ grafana: PS: The label `release=kube-prometheus-stack` is setup with the helmchart of the Prometheus Operator. For Grafana Dashboards it may be necessary to enable scanning in the correct namespaces (or ALL), enabled by `sidecar.dashboards.searchNamespace` in [Helmchart of grafana](https://artifacthub.io/packages/helm/grafana/grafana) (which is part of PrometheusOperator, so `grafana.sidecar.dashboards.searchNamespace`) ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) \ No newline at end of file +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/helm/dendrite/grafana_dashboards/dendrite-rev2.json b/helm/dendrite/grafana_dashboards/dendrite-rev2.json index 420d8bf1b8..eeb95ff976 100644 --- a/helm/dendrite/grafana_dashboards/dendrite-rev2.json +++ b/helm/dendrite/grafana_dashboards/dendrite-rev2.json @@ -21,7 +21,7 @@ } ] }, - "description": "Dendrite dashboard from https://github.com/matrix-org/dendrite/", + "description": "Dendrite dashboard from https://github.com/element-hq/dendrite/", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 13916, @@ -95,9 +95,7 @@ "justifyMode": "auto", "orientation": "auto", "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "", "values": false }, @@ -191,10 +189,7 @@ "id": 6, "options": { "legend": { - "calcs": [ - "mean", - "lastNotNull" - ], + "calcs": ["mean", "lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true @@ -326,10 +321,7 @@ "id": 10, "options": { "legend": { - "calcs": [ - "mean", - "lastNotNull" - ], + "calcs": ["mean", "lastNotNull"], "displayMode": "table", "placement": "right", "showLegend": true @@ -384,10 +376,7 @@ "refresh": "10s", "schemaVersion": 37, "style": "dark", - "tags": [ - "matrix", - "dendrite" - ], + "tags": ["matrix", "dendrite"], "templating": { "list": [ { @@ -411,12 +400,8 @@ { "current": { "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] + "text": ["All"], + "value": ["$__all"] }, "datasource": { "type": "prometheus", diff --git a/helm/dendrite/templates/_helpers.tpl b/helm/dendrite/templates/_helpers.tpl index 36bcefd8f1..5f782c19d9 100644 --- a/helm/dendrite/templates/_helpers.tpl +++ b/helm/dendrite/templates/_helpers.tpl @@ -1,6 +1,6 @@ {{- define "validate.config" }} {{- if and (not .Values.signing_key.create) (eq .Values.signing_key.existingSecret "") -}} -{{- fail "You must create a signing key for configuration.signing_key OR specify an existing secret name in .Values.signing_key.existingSecret to mount it. (see https://github.com/matrix-org/dendrite/blob/master/docs/INSTALL.md#server-key-generation)" -}} +{{- fail "You must create a signing key for configuration.signing_key OR specify an existing secret name in .Values.signing_key.existingSecret to mount it. (see https://github.com/element-hq/dendrite/blob/master/docs/INSTALL.md#server-key-generation)" -}} {{- end -}} {{- if and (not .Values.postgresql.enabled) (eq .Values.dendrite_config.global.database.connection_string "") -}} {{- fail "Database connection string must be set." -}} @@ -65,4 +65,4 @@ Selector labels {{- define "dendrite.selectorLabels" -}} app.kubernetes.io/name: {{ include "dendrite.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/helm/dendrite/values.yaml b/helm/dendrite/values.yaml index 02cd1aa135..b5da4ca5da 100644 --- a/helm/dendrite/values.yaml +++ b/helm/dendrite/values.yaml @@ -1,6 +1,6 @@ image: # -- Docker repository/image to use - repository: "ghcr.io/matrix-org/dendrite-monolith" + repository: "ghcr.io/element-hq/dendrite-monolith" # -- Kubernetes pullPolicy pullPolicy: IfNotPresent # -- Overrides the image tag whose default is the chart appVersion. @@ -250,7 +250,8 @@ dendrite_config: # -- Configuration for experimental MSC's. (Valid values are: msc2836) mscs: - mscs: [] + mscs: + [] # A list of enabled MSC's # Currently valid values are: # - msc2836 (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836) @@ -366,7 +367,7 @@ dendrite_config: index_path: "/data/search" # -- The language most likely to be used on the server - used when indexing, to # ensure the returned results match expectations. A full list of possible languages - # can be found [here](https://github.com/matrix-org/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46) + # can be found [here](https://github.com/element-hq/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46) language: "en" user_api: @@ -382,8 +383,8 @@ dendrite_config: # -- Default logging configuration logging: - - type: std - level: info + - type: std + level: info postgresql: # -- Enable and configure postgres as the database for dendrite. diff --git a/internal/caching/cache_eventstatekeys.go b/internal/caching/cache_eventstatekeys.go index 51e2499d5a..f70c56e47a 100644 --- a/internal/caching/cache_eventstatekeys.go +++ b/internal/caching/cache_eventstatekeys.go @@ -1,6 +1,6 @@ package caching -import "github.com/matrix-org/dendrite/roomserver/types" +import "github.com/element-hq/dendrite/roomserver/types" // EventStateKeyCache contains the subset of functions needed for // a room event state key cache. diff --git a/internal/caching/cache_federationevents.go b/internal/caching/cache_federationevents.go index fc1f5496e8..4af8cbc624 100644 --- a/internal/caching/cache_federationevents.go +++ b/internal/caching/cache_federationevents.go @@ -1,7 +1,7 @@ package caching import ( - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/internal/caching/cache_lazy_load_members.go b/internal/caching/cache_lazy_load_members.go index 390334da79..8bc5add257 100644 --- a/internal/caching/cache_lazy_load_members.go +++ b/internal/caching/cache_lazy_load_members.go @@ -1,7 +1,7 @@ package caching import ( - userapi "github.com/matrix-org/dendrite/userapi/api" + userapi "github.com/element-hq/dendrite/userapi/api" ) type lazyLoadingCacheKey struct { diff --git a/internal/caching/cache_roomevents.go b/internal/caching/cache_roomevents.go index e8bbe208e2..371683d136 100644 --- a/internal/caching/cache_roomevents.go +++ b/internal/caching/cache_roomevents.go @@ -1,7 +1,7 @@ package caching import ( - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" ) // RoomServerEventsCache contains the subset of functions needed for diff --git a/internal/caching/cache_roomservernids.go b/internal/caching/cache_roomservernids.go index fa0781ef3a..229124fa04 100644 --- a/internal/caching/cache_roomservernids.go +++ b/internal/caching/cache_roomservernids.go @@ -1,7 +1,7 @@ package caching import ( - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" ) type RoomServerCaches interface { diff --git a/internal/caching/cache_typing.go b/internal/caching/cache_typing.go index bd6a5fc1b1..44bc3c7b39 100644 --- a/internal/caching/cache_typing.go +++ b/internal/caching/cache_typing.go @@ -1,18 +1,10 @@ +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // Copyright 2017 Vector Creations Ltd -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package caching diff --git a/internal/caching/cache_typing_test.go b/internal/caching/cache_typing_test.go index 2cef32d3e5..98caba2fd3 100644 --- a/internal/caching/cache_typing_test.go +++ b/internal/caching/cache_typing_test.go @@ -1,18 +1,10 @@ +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // Copyright 2017 Vector Creations Ltd -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package caching @@ -20,7 +12,7 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/test" ) func TestEDUCache(t *testing.T) { diff --git a/internal/caching/caches.go b/internal/caching/caches.go index 16e547578f..28b67cabe0 100644 --- a/internal/caching/caches.go +++ b/internal/caching/caches.go @@ -1,21 +1,13 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package caching import ( - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" ) diff --git a/internal/caching/impl_ristretto.go b/internal/caching/impl_ristretto.go index 97ea9548f6..12b60ba90e 100644 --- a/internal/caching/impl_ristretto.go +++ b/internal/caching/impl_ristretto.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package caching @@ -27,8 +19,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" ) const ( diff --git a/internal/eventutil/eventcontent.go b/internal/eventutil/eventcontent.go index e3c80f1d05..1a3222f850 100644 --- a/internal/eventutil/eventcontent.go +++ b/internal/eventutil/eventcontent.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package eventutil diff --git a/internal/eventutil/events.go b/internal/eventutil/events.go index 40d62fd68e..852caab205 100644 --- a/internal/eventutil/events.go +++ b/internal/eventutil/events.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package eventutil @@ -20,9 +12,9 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/synctypes" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/internal/eventutil/types.go b/internal/eventutil/types.go index e43c0412e4..d971934138 100644 --- a/internal/eventutil/types.go +++ b/internal/eventutil/types.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package eventutil import ( "strconv" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/syncapi/types" ) // AccountData represents account data sent from the client API server to the diff --git a/internal/fulltext/bleve.go b/internal/fulltext/bleve.go index d2807198af..de58e476b5 100644 --- a/internal/fulltext/bleve.go +++ b/internal/fulltext/bleve.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm @@ -22,7 +14,7 @@ import ( "strings" "github.com/blevesearch/bleve/v2" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/spec" // side effect imports to allow all possible languages @@ -49,7 +41,7 @@ import ( _ "github.com/blevesearch/bleve/v2/analysis/lang/tr" "github.com/blevesearch/bleve/v2/mapping" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" ) // Search contains all existing bleve.Index diff --git a/internal/fulltext/bleve_test.go b/internal/fulltext/bleve_test.go index decb5eccba..c71bbce821 100644 --- a/internal/fulltext/bleve_test.go +++ b/internal/fulltext/bleve_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package fulltext_test @@ -18,12 +10,12 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/internal/fulltext" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/fulltext" + "github.com/element-hq/dendrite/setup/config" ) func mustOpenIndex(t *testing.T, tempDir string) (*fulltext.Search, *process.ProcessContext) { diff --git a/internal/fulltext/bleve_wasm.go b/internal/fulltext/bleve_wasm.go index 12709900b8..5f16bd9e51 100644 --- a/internal/fulltext/bleve_wasm.go +++ b/internal/fulltext/bleve_wasm.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package fulltext import ( "time" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" ) type Search struct{} diff --git a/internal/hooks/hooks.go b/internal/hooks/hooks.go index 802ff81871..25a8520cc9 100644 --- a/internal/hooks/hooks.go +++ b/internal/hooks/hooks.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package hooks exposes places in Dendrite where custom code can be executed, useful for MSCs. // Hooks can only be run in monolith mode. diff --git a/internal/httputil/httpapi.go b/internal/httputil/httpapi.go index 034f19f1fb..d32557679c 100644 --- a/internal/httputil/httpapi.go +++ b/internal/httputil/httpapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package httputil @@ -31,9 +23,9 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/clientapi/auth" - "github.com/matrix-org/dendrite/internal" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/auth" + "github.com/element-hq/dendrite/internal" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/internal/httputil/httpapi_test.go b/internal/httputil/httpapi_test.go index de6ccf9b4d..23797a5ea7 100644 --- a/internal/httputil/httpapi_test.go +++ b/internal/httputil/httpapi_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package httputil diff --git a/internal/httputil/paths.go b/internal/httputil/paths.go index d06875428f..663d0e9804 100644 --- a/internal/httputil/paths.go +++ b/internal/httputil/paths.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package httputil diff --git a/internal/httputil/rate_limiting.go b/internal/httputil/rate_limiting.go index 0b040d7f37..e0870dcef8 100644 --- a/internal/httputil/rate_limiting.go +++ b/internal/httputil/rate_limiting.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/internal/httputil/routing.go b/internal/httputil/routing.go index f5f1c6528e..5c378c6642 100644 --- a/internal/httputil/routing.go +++ b/internal/httputil/routing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package httputil diff --git a/internal/log.go b/internal/log.go index 8fe98f20c9..35c35bd132 100644 --- a/internal/log.go +++ b/internal/log.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -31,7 +23,7 @@ import ( "github.com/matrix-org/dugong" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" ) // logrus is using a global variable when we're using `logrus.AddHook` diff --git a/internal/log_unix.go b/internal/log_unix.go index 3f15063d18..1cb54da1f6 100644 --- a/internal/log_unix.go +++ b/internal/log_unix.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !windows // +build !windows @@ -25,7 +17,7 @@ import ( "github.com/sirupsen/logrus" lSyslog "github.com/sirupsen/logrus/hooks/syslog" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" ) // SetupHookLogging configures the logging hooks defined in the configuration. diff --git a/internal/log_windows.go b/internal/log_windows.go index e1f0098a1b..a23d69a6b1 100644 --- a/internal/log_windows.go +++ b/internal/log_windows.go @@ -1,21 +1,13 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal import ( - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/sirupsen/logrus" ) diff --git a/internal/pushgateway/client.go b/internal/pushgateway/client.go index d5671be3bf..43ee5f8b1f 100644 --- a/internal/pushgateway/client.go +++ b/internal/pushgateway/client.go @@ -9,7 +9,7 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/internal" + "github.com/element-hq/dendrite/internal" ) type httpClient struct { diff --git a/internal/sqlutil/connection_manager.go b/internal/sqlutil/connection_manager.go index 437da6c807..330d2215be 100644 --- a/internal/sqlutil/connection_manager.go +++ b/internal/sqlutil/connection_manager.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlutil @@ -19,8 +11,8 @@ import ( "fmt" "sync" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" ) type Connections struct { diff --git a/internal/sqlutil/connection_manager_test.go b/internal/sqlutil/connection_manager_test.go index 5086684b5c..0195b7adde 100644 --- a/internal/sqlutil/connection_manager_test.go +++ b/internal/sqlutil/connection_manager_test.go @@ -4,10 +4,10 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/test" ) func TestConnectionManager(t *testing.T) { diff --git a/internal/sqlutil/migrate.go b/internal/sqlutil/migrate.go index 735fb4927c..33b3f24d63 100644 --- a/internal/sqlutil/migrate.go +++ b/internal/sqlutil/migrate.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlutil @@ -23,7 +15,7 @@ import ( "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" + "github.com/element-hq/dendrite/internal" ) const createDBMigrationsSQL = "" + diff --git a/internal/sqlutil/migrate_test.go b/internal/sqlutil/migrate_test.go index 30aa6790cb..68c5657331 100644 --- a/internal/sqlutil/migrate_test.go +++ b/internal/sqlutil/migrate_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/test" ) var dummyMigrations = []sqlutil.Migration{ diff --git a/internal/sqlutil/sql.go b/internal/sqlutil/sql.go index 81c055edd4..6b47980d82 100644 --- a/internal/sqlutil/sql.go +++ b/internal/sqlutil/sql.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlutil diff --git a/internal/sqlutil/sqlutil.go b/internal/sqlutil/sqlutil.go index b2d0d2186d..00ea117b56 100644 --- a/internal/sqlutil/sqlutil.go +++ b/internal/sqlutil/sqlutil.go @@ -6,7 +6,7 @@ import ( "fmt" "regexp" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/sirupsen/logrus" ) diff --git a/internal/sqlutil/unique_constraint.go b/internal/sqlutil/unique_constraint.go index 767a586ecd..1730c4479e 100644 --- a/internal/sqlutil/unique_constraint.go +++ b/internal/sqlutil/unique_constraint.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm && !cgo // +build !wasm,!cgo diff --git a/internal/sqlutil/unique_constraint_cgo.go b/internal/sqlutil/unique_constraint_cgo.go index edeb7c450c..0de0db6b99 100644 --- a/internal/sqlutil/unique_constraint_cgo.go +++ b/internal/sqlutil/unique_constraint_cgo.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm && cgo // +build !wasm,cgo diff --git a/internal/sqlutil/unique_constraint_wasm.go b/internal/sqlutil/unique_constraint_wasm.go index ef393fa592..391c78bebf 100644 --- a/internal/sqlutil/unique_constraint_wasm.go +++ b/internal/sqlutil/unique_constraint_wasm.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build wasm // +build wasm diff --git a/internal/sqlutil/uri.go b/internal/sqlutil/uri.go index 44910f4a9f..c59ddc63f7 100644 --- a/internal/sqlutil/uri.go +++ b/internal/sqlutil/uri.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlutil @@ -19,7 +11,7 @@ import ( "fmt" "net/url" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" ) // ParseFileURI returns the filepath in the given file: URI. Specifically, this will handle diff --git a/internal/tracing.go b/internal/tracing.go index 4e062aed32..923c46737d 100644 --- a/internal/tracing.go +++ b/internal/tracing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal diff --git a/internal/transactionrequest.go b/internal/transactionrequest.go index 0663c2dcbe..474195f6ce 100644 --- a/internal/transactionrequest.go +++ b/internal/transactionrequest.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -20,13 +12,13 @@ import ( "fmt" "sync" + "github.com/element-hq/dendrite/federationapi/producers" + "github.com/element-hq/dendrite/federationapi/types" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + syncTypes "github.com/element-hq/dendrite/syncapi/types" + userAPI "github.com/element-hq/dendrite/userapi/api" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/federationapi/producers" - "github.com/matrix-org/dendrite/federationapi/types" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - syncTypes "github.com/matrix-org/dendrite/syncapi/types" - userAPI "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/internal/transactionrequest_test.go b/internal/transactionrequest_test.go index 8dd100d118..4049e47ec4 100644 --- a/internal/transactionrequest_test.go +++ b/internal/transactionrequest_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -29,15 +21,15 @@ import ( "github.com/stretchr/testify/assert" "gotest.tools/v3/poll" - "github.com/matrix-org/dendrite/federationapi/producers" - rsAPI "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" - keyAPI "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/federationapi/producers" + rsAPI "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" + keyAPI "github.com/element-hq/dendrite/userapi/api" ) const ( diff --git a/internal/transactions/transactions.go b/internal/transactions/transactions.go index 7ff6f5044f..420f5327bd 100644 --- a/internal/transactions/transactions.go +++ b/internal/transactions/transactions.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package transactions diff --git a/internal/transactions/transactions_test.go b/internal/transactions/transactions_test.go index c552550acc..694663549d 100644 --- a/internal/transactions/transactions_test.go +++ b/internal/transactions/transactions_test.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package transactions diff --git a/internal/validate.go b/internal/validate.go index c831565f5d..24c8fcf006 100644 --- a/internal/validate.go +++ b/internal/validate.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -20,8 +12,8 @@ import ( "net/http" "regexp" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/internal/validate_test.go b/internal/validate_test.go index 1019102df5..5ddb1b2950 100644 --- a/internal/validate_test.go +++ b/internal/validate_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/internal/version.go b/internal/version.go index e5ff5af8ec..6e5a5f94ea 100644 --- a/internal/version.go +++ b/internal/version.go @@ -9,10 +9,10 @@ import ( // the final version string var version string -// -ldflags "-X github.com/matrix-org/dendrite/internal.branch=master" +// -ldflags "-X github.com/element-hq/dendrite/internal.branch=master" var branch string -// -ldflags "-X github.com/matrix-org/dendrite/internal.build=alpha" +// -ldflags "-X github.com/element-hq/dendrite/internal.build=alpha" var build string const ( diff --git a/mediaapi/fileutils/fileutils.go b/mediaapi/fileutils/fileutils.go index 2e719dc823..9712e92542 100644 --- a/mediaapi/fileutils/fileutils.go +++ b/mediaapi/fileutils/fileutils.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package fileutils @@ -25,8 +17,8 @@ import ( "path/filepath" "strings" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/util" log "github.com/sirupsen/logrus" ) @@ -161,6 +153,10 @@ func moveFile(src types.Path, dst types.Path) error { return nil } +func MoveFile(src types.Path, dst types.Path) error { + return moveFile(src, dst) +} + func createTempFileWriter(absBasePath config.Path) (*bufio.Writer, *os.File, types.Path, error) { tmpDir, err := createTempDir(absBasePath) if err != nil { diff --git a/mediaapi/mediaapi.go b/mediaapi/mediaapi.go index 8b843e9072..ac20c886fd 100644 --- a/mediaapi/mediaapi.go +++ b/mediaapi/mediaapi.go @@ -1,26 +1,18 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package mediaapi import ( - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/routing" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/routing" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/sirupsen/logrus" diff --git a/mediaapi/routing/download.go b/mediaapi/routing/download.go index c3ac3cdc74..941411987d 100644 --- a/mediaapi/routing/download.go +++ b/mediaapi/routing/download.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -33,11 +25,11 @@ import ( "sync" "unicode" - "github.com/matrix-org/dendrite/mediaapi/fileutils" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/thumbnailer" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/mediaapi/fileutils" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/thumbnailer" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" @@ -316,10 +308,11 @@ func (r *downloadRequest) respondFromLocalFile( return nil, fmt.Errorf("fileutils.GetPathFromBase64Hash: %w", err) } file, err := os.Open(filePath) - defer file.Close() // nolint: errcheck, staticcheck, megacheck if err != nil { return nil, fmt.Errorf("os.Open: %w", err) } + defer file.Close() // nolint: errcheck, staticcheck, megacheck + stat, err := file.Stat() if err != nil { return nil, fmt.Errorf("file.Stat: %w", err) diff --git a/mediaapi/routing/download_test.go b/mediaapi/routing/download_test.go index 9654b74744..4a91ad50bd 100644 --- a/mediaapi/routing/download_test.go +++ b/mediaapi/routing/download_test.go @@ -7,7 +7,7 @@ import ( "net/http/httptest" "testing" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/stretchr/testify/assert" ) diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go index 2867df605c..43ed62040c 100644 --- a/mediaapi/routing/routing.go +++ b/mediaapi/routing/routing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,13 +11,13 @@ import ( "net/http" "strings" + "github.com/element-hq/dendrite/federationapi/routing" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/federationapi/routing" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" @@ -96,6 +88,8 @@ func Setup( MXCToResult: map[string]*types.RemoteRequestResult{}, } + // v1 url_preview endpoint requiring auth + downloadHandler := makeDownloadAPI("download_unauthed", &cfg.MediaAPI, rateLimits, db, client, federationClient, activeRemoteRequests, activeThumbnailGeneration, false) v3mux.Handle("/download/{serverName}/{mediaId}", downloadHandler).Methods(http.MethodGet, http.MethodOptions) v3mux.Handle("/download/{serverName}/{mediaId}/{downloadName}", downloadHandler).Methods(http.MethodGet, http.MethodOptions) @@ -110,6 +104,11 @@ func Setup( v1mux.Handle("/download/{serverName}/{mediaId}", downloadHandlerAuthed).Methods(http.MethodGet, http.MethodOptions) v1mux.Handle("/download/{serverName}/{mediaId}/{downloadName}", downloadHandlerAuthed).Methods(http.MethodGet, http.MethodOptions) + urlPreviewHandler := httputil.MakeAuthAPI("preview_url", userAPI, makeUrlPreviewHandler(&cfg.MediaAPI, rateLimits, db, activeThumbnailGeneration)) + v1mux.Handle("/preview_url", urlPreviewHandler).Methods(http.MethodGet, http.MethodOptions) + // That method is deprecated according to spec but still in use + v3mux.Handle("/preview_url", urlPreviewHandler).Methods(http.MethodGet, http.MethodOptions) + v1mux.Handle("/thumbnail/{serverName}/{mediaId}", httputil.MakeHTTPAPI("thumbnail", userAPI, cfg.Global.Metrics.Enabled, makeDownloadAPI("thumbnail_authed_client", &cfg.MediaAPI, rateLimits, db, client, federationClient, activeRemoteRequests, activeThumbnailGeneration, false), httputil.WithAuth()), ).Methods(http.MethodGet, http.MethodOptions) diff --git a/mediaapi/routing/upload.go b/mediaapi/routing/upload.go index 5ac1d076b8..6d1680a940 100644 --- a/mediaapi/routing/upload.go +++ b/mediaapi/routing/upload.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -26,12 +18,12 @@ import ( "path" "strings" - "github.com/matrix-org/dendrite/mediaapi/fileutils" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/thumbnailer" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/mediaapi/fileutils" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/thumbnailer" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/mediaapi/routing/upload_test.go b/mediaapi/routing/upload_test.go index d088950caa..fb5c8f9e87 100644 --- a/mediaapi/routing/upload_test.go +++ b/mediaapi/routing/upload_test.go @@ -9,11 +9,11 @@ import ( "strings" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/fileutils" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/fileutils" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/util" log "github.com/sirupsen/logrus" ) diff --git a/mediaapi/routing/url_preview.go b/mediaapi/routing/url_preview.go new file mode 100644 index 0000000000..af011820f0 --- /dev/null +++ b/mediaapi/routing/url_preview.go @@ -0,0 +1,679 @@ +package routing + +import ( + "bytes" + "context" + "crypto/sha256" + "crypto/tls" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "os" + "path/filepath" + "regexp" + "strconv" + "strings" + "sync" + "time" + + "github.com/matrix-org/dendrite/internal/httputil" + "github.com/matrix-org/dendrite/mediaapi/fileutils" + "github.com/matrix-org/dendrite/mediaapi/storage" + "github.com/matrix-org/dendrite/mediaapi/thumbnailer" + "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" + userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/matrix-org/gomatrixserverlib/spec" + "github.com/matrix-org/util" + "github.com/pkg/errors" + log "github.com/sirupsen/logrus" + "golang.org/x/net/html" +) + +var ( + ErrorMissingUrl = errors.New("missing url") + ErrorUnsupportedContentType = errors.New("unsupported content type") + ErrorFileTooLarge = errors.New("file too large") + ErrorTimeoutThumbnailGenerator = errors.New("timeout waiting for thumbnail generator") + ErrNoMetadataFound = errors.New("no metadata found") + ErrorBlackListed = errors.New("url is blacklisted") +) + +func makeUrlPreviewHandler( + cfg *config.MediaAPI, + rateLimits *httputil.RateLimits, + db storage.Database, + activeThumbnailGeneration *types.ActiveThumbnailGeneration, +) func(req *http.Request, device *userapi.Device) util.JSONResponse { + + activeUrlPreviewRequests := &types.ActiveUrlPreviewRequests{Url: map[string]*types.UrlPreviewResult{}} + urlPreviewCache := &types.UrlPreviewCache{Records: map[string]*types.UrlPreviewCacheRecord{}} + urlBlackList := createUrlBlackList(cfg) + + go func() { + for { + t := time.Now().Unix() + urlPreviewCache.Lock() + for k, record := range urlPreviewCache.Records { + if record.Created < (t - int64(cfg.UrlPreviewCacheTime)) { + delete(urlPreviewCache.Records, k) + } + } + urlPreviewCache.Unlock() + time.Sleep(time.Duration(60) * time.Second) + } + }() + + httpHandler := func(req *http.Request, device *userapi.Device) util.JSONResponse { + req = util.RequestWithLogging(req) + + // log := util.GetLogger(req.Context()) + // Here be call to the url preview handler + pUrl := req.URL.Query().Get("url") + ts := req.URL.Query().Get("ts") + if pUrl == "" { + return util.ErrorResponse(ErrorMissingUrl) + } + _ = ts + + logger := util.GetLogger(req.Context()).WithFields(log.Fields{ + "url": pUrl, + }) + // Check rate limits + if r := rateLimits.Limit(req, device); r != nil { + return *r + } + + // Check if the url is in the blacklist + if checkURLBlacklisted(urlBlackList, pUrl) { + logger.Debug("The url is in the blacklist") + return util.ErrorResponse(ErrorBlackListed) + } + + urlParsed, perr := url.Parse(pUrl) + if perr != nil { + return util.ErrorResponse(ErrorMissingUrl) + } + + hash := getHashFromString(pUrl) + + // Get for url preview from in-memory cache + if response, ok := checkInternalCacheResponse(urlPreviewCache, pUrl); ok { + return response + } + + if urlPreviewCached, err := loadUrlPreviewResponse(req.Context(), cfg, db, hash); err == nil { + logger.Debug("Loaded url preview from the cache") + // Put in into the cache for further usage + defer func() { + if _, ok := urlPreviewCache.Records[pUrl]; !ok { + + urlPreviewCacheItem := &types.UrlPreviewCacheRecord{ + Created: time.Now().Unix(), + Preview: urlPreviewCached, + } + urlPreviewCache.Lock() + urlPreviewCache.Records[pUrl] = urlPreviewCacheItem + defer urlPreviewCache.Unlock() + } + }() + + return util.JSONResponse{ + Code: http.StatusOK, + JSON: urlPreviewCached, + } + } + + // Check if there is an active request + if response, ok := checkActivePreviewResponse(activeUrlPreviewRequests, pUrl); ok { + return response + } + + // Start new url preview request + activeUrlPreviewRequest := &types.UrlPreviewResult{Cond: sync.NewCond(&sync.Mutex{})} + activeUrlPreviewRequests.Url[pUrl] = activeUrlPreviewRequest + activeUrlPreviewRequests.Unlock() + + // we defer caching the url preview response as well as signalling the waiting goroutines + // about the completion of the request + defer func() { + + urlPreviewCacheItem := &types.UrlPreviewCacheRecord{ + Created: time.Now().Unix(), + } + if activeUrlPreviewRequest.Error != nil { + urlPreviewCacheItem.Error = activeUrlPreviewRequest.Error + } else { + urlPreviewCacheItem.Preview = activeUrlPreviewRequest.Preview + // Store the response file for further usage + err := storeUrlPreviewResponse(req.Context(), cfg, db, *device, hash, activeUrlPreviewRequest.Preview, logger) + if err != nil { + logger.WithError(err).Error("unable to store url preview response") + } + } + + urlPreviewCache.Lock() + urlPreviewCache.Records[pUrl] = urlPreviewCacheItem + defer urlPreviewCache.Unlock() + + activeUrlPreviewRequests.Lock() + activeUrlPreviewRequests.Url[pUrl].Cond.Broadcast() + delete(activeUrlPreviewRequests.Url, pUrl) + defer activeUrlPreviewRequests.Unlock() + }() + + resp, err := downloadUrl(pUrl, time.Duration(cfg.UrlPreviewTimeout)*time.Second) + if err != nil { + activeUrlPreviewRequest.Error = err + } else { + defer resp.Body.Close() // nolint: errcheck + + var result *types.UrlPreview + var err error + var mediaData *types.MediaMetadata + var width, height int + + if strings.HasPrefix(resp.Header.Get("Content-Type"), "text/html") { + // The url is a webpage - get data from the meta tags + result = getPreviewFromHTML(resp, urlParsed) + if result.ImageUrl != "" { + // In case of an image in the preview we download it + if imgReader, derr := downloadUrl(result.ImageUrl, time.Duration(cfg.UrlPreviewTimeout)*time.Second); derr == nil { + mediaData, width, height, _ = downloadAndStoreImage("url_preview", req.Context(), imgReader, cfg, device, db, activeThumbnailGeneration, logger) + } + // We don't show the original image in the preview + // as it is insecure for room members + result.ImageUrl = "" + } + } else if strings.HasPrefix(resp.Header.Get("Content-Type"), "image/") { + // The url is an image link + mediaData, width, height, err = downloadAndStoreImage("somefile", req.Context(), resp, cfg, device, db, activeThumbnailGeneration, logger) + if err == nil { + result = &types.UrlPreview{} + } + } else { + return util.ErrorResponse(errors.New("Unsupported content type")) + } + + // In case of any error happened during the page/image download + // we store the error instead of the preview + if err != nil { + activeUrlPreviewRequest.Error = err + } else { + // We have a mediadata so we have an image in the preview + if mediaData != nil { + result.ImageUrl = fmt.Sprintf("mxc://%s/%s", mediaData.Origin, mediaData.MediaID) + result.ImageWidth = width + result.ImageHeight = height + result.ImageType = mediaData.ContentType + result.ImageSize = mediaData.FileSizeBytes + } + + activeUrlPreviewRequest.Preview = result + } + } + + // Return eather the error or the preview + if activeUrlPreviewRequest.Error != nil { + return util.ErrorResponse(activeUrlPreviewRequest.Error) + } else { + + return util.JSONResponse{ + Code: http.StatusOK, + JSON: activeUrlPreviewRequest.Preview, + } + } + } + + return httpHandler + +} + +func checkInternalCacheResponse(urlPreviewCache *types.UrlPreviewCache, url string) (util.JSONResponse, bool) { + if cacheRecord, ok := urlPreviewCache.Records[url]; ok { + if cacheRecord.Error != nil { + return util.ErrorResponse(cacheRecord.Error), true + } + return util.JSONResponse{ + Code: http.StatusOK, + JSON: cacheRecord.Preview, + }, true + } + return util.JSONResponse{}, false +} + +func checkActivePreviewResponse(activeUrlPreviewRequests *types.ActiveUrlPreviewRequests, url string) (util.JSONResponse, bool) { + activeUrlPreviewRequests.Lock() + if activeUrlPreviewRequest, ok := activeUrlPreviewRequests.Url[url]; ok { + activeUrlPreviewRequests.Unlock() + // Wait for it to complete + activeUrlPreviewRequest.Cond.L.Lock() + defer activeUrlPreviewRequest.Cond.L.Unlock() + activeUrlPreviewRequest.Cond.Wait() + + if activeUrlPreviewRequest.Error != nil { + return util.ErrorResponse(activeUrlPreviewRequest.Error), true + } + return util.JSONResponse{ + Code: http.StatusOK, + JSON: activeUrlPreviewRequest.Preview, + }, true + } + return util.JSONResponse{}, false +} + +func downloadUrl(url string, t time.Duration) (*http.Response, error) { + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + client := http.Client{Timeout: t, Transport: tr} + resp, err := client.Get(url) + if err != nil { + return nil, err + } + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return nil, errors.New("HTTP status code: " + strconv.Itoa(resp.StatusCode)) + } + + return resp, nil +} + +func getPreviewFromHTML(resp *http.Response, urlParsed *url.URL) *types.UrlPreview { + + fields := getMetaFieldsFromHTML(resp) + preview := &types.UrlPreview{ + Title: fields["og:title"], + Description: fields["og:description"], + Type: fields["og:type"], + Url: fields["og:url"], + } + + if fields["og:title"] == "" { + preview.Title = urlParsed.String() + } + if fields["og:image"] != "" { + preview.ImageUrl = fields["og:image"] + } else if fields["og:image:url"] != "" { + preview.ImageUrl = fields["og:image:url"] + } else if fields["og:image:secure_url"] != "" { + preview.ImageUrl = fields["og:image:secure_url"] + } + + if preview.ImageUrl != "" { + if imgUrl, err := url.Parse(preview.ImageUrl); err == nil { + // Use the same scheme and host as the original URL if empty + if imgUrl.Scheme == "" { + imgUrl.Scheme = urlParsed.Scheme + } + // Use the same host as the original URL if empty + if imgUrl.Host == "" { + imgUrl.Host = urlParsed.Host + } + preview.ImageUrl = imgUrl.String() + } else { + preview.ImageUrl = "" + } + } + + return preview +} + +func downloadAndStoreImage( + filename string, + ctx context.Context, + req *http.Response, + cfg *config.MediaAPI, + dev *userapi.Device, + db storage.Database, + activeThumbnailGeneration *types.ActiveThumbnailGeneration, + logger *log.Entry, + +) (*types.MediaMetadata, int, int, error) { + + var width, height int + + userid := types.MatrixUserID(dev.UserID) + + reqReader := req.Body.(io.Reader) + if cfg.MaxFileSizeBytes > 0 { + reqReader = io.LimitReader(reqReader, int64(cfg.MaxFileSizeBytes)+1) + } + hash, bytesWritten, tmpDir, fileErr := fileutils.WriteTempFile(ctx, reqReader, cfg.AbsBasePath) + if fileErr != nil { + logger.WithError(fileErr).WithFields(log.Fields{ + "MaxFileSizeBytes": cfg.MaxFileSizeBytes, + }).Warn("Error while transferring file") + return nil, width, height, fileErr + } + defer fileutils.RemoveDir(tmpDir, logger) + + // Check if temp file size exceeds max file size configuration + if cfg.MaxFileSizeBytes > 0 && bytesWritten > types.FileSizeBytes(cfg.MaxFileSizeBytes) { + return nil, 0, 0, ErrorFileTooLarge + } + + // Check if we already have this file + existingMetadata, err := db.GetMediaMetadataByHash( + ctx, hash, cfg.Matrix.ServerName, + ) + if err != nil { + logger.WithError(err).Error("unable to get media metadata by hash") + return nil, width, height, err + } + + if existingMetadata != nil { + + logger.WithField("mediaID", existingMetadata.MediaID).Debug("media already exists") + // Here we have to read the image to get it's size + filePath, pathErr := fileutils.GetPathFromBase64Hash(existingMetadata.Base64Hash, cfg.AbsBasePath) + if pathErr != nil { + return nil, width, height, pathErr + } + width, height, err = thumbnailer.GetImageSize(string(filePath)) + if err != nil { + return nil, width, height, err + } + return existingMetadata, width, height, nil + } + + tmpFileName := filepath.Join(string(tmpDir), "content") + fileType, typeErr := detectFileType(tmpFileName, logger) + if typeErr != nil { + logger.WithError(err).Error("unable to detect file type") + return nil, width, height, typeErr + } + logger.WithField("contentType", fileType).Debug("uploaded file is an image") + + var thumbnailPath string + + if cfg.UrlPreviewThumbnailSize.Width != 0 { + // Create a thumbnail from the image + thumbnailPath = tmpFileName + ".thumbnail" + + width, height, err = createThumbnail(types.Path(tmpFileName), types.Path(thumbnailPath), types.ThumbnailSize(cfg.UrlPreviewThumbnailSize), + hash, activeThumbnailGeneration, cfg.MaxThumbnailGenerators, logger) + if err != nil { + if errors.Is(err, thumbnailer.ErrThumbnailTooLarge) { + // In case the image is smaller than the thumbnail size + // we don't create a thumbnail + thumbnailPath = tmpFileName + } else { + return nil, width, height, err + } + } + } else { + // No thumbnail size specified, use the original image + thumbnailPath = tmpFileName + width, height, err = thumbnailer.GetImageSize(thumbnailPath) + if err != nil { + return nil, width, height, err + } + + } + + thumbnailFileInfo, statErr := os.Stat(thumbnailPath) + if statErr != nil { + logger.WithError(statErr).Error("unable to get thumbnail file info") + return nil, width, height, statErr + } + + r := &uploadRequest{ + MediaMetadata: &types.MediaMetadata{ + Origin: cfg.Matrix.ServerName, + }, + Logger: logger, + } + + // Move the thumbnail to the media store + mediaID, mediaErr := r.generateMediaID(ctx, db) + if mediaErr != nil { + logger.WithError(mediaErr).Error("unable to generate media ID") + return nil, width, height, mediaErr + } + mediaMetaData := &types.MediaMetadata{ + MediaID: mediaID, + Origin: cfg.Matrix.ServerName, + ContentType: types.ContentType(fileType), + FileSizeBytes: types.FileSizeBytes(thumbnailFileInfo.Size()), + UploadName: types.Filename(filename), + CreationTimestamp: spec.Timestamp(time.Now().Unix()), + Base64Hash: hash, + UserID: userid, + } + + finalPath, pathErr := fileutils.GetPathFromBase64Hash(mediaMetaData.Base64Hash, cfg.AbsBasePath) + if pathErr != nil { + logger.WithError(pathErr).Error("unable to get path from base64 hash") + return nil, width, height, pathErr + } + err = fileutils.MoveFile(types.Path(thumbnailPath), types.Path(finalPath)) + if err != nil { + logger.WithError(err).Error("unable to move thumbnail file") + return nil, width, height, err + } + // Store the metadata in the database + err = db.StoreMediaMetadata(ctx, mediaMetaData) + if err != nil { + logger.WithError(err).Error("unable to store media metadata") + return nil, width, height, err + } + + return mediaMetaData, width, height, nil +} + +func createThumbnail(src types.Path, dst types.Path, size types.ThumbnailSize, hash types.Base64Hash, activeThumbnailGeneration *types.ActiveThumbnailGeneration, maxThumbnailGenerators int, logger *log.Entry) (int, int, error) { + timeout := time.After(30 * time.Second) + for { + // Check if we have too many thumbnail generators running + // If so, wait up to 30 seconds for one to finish + if len(activeThumbnailGeneration.PathToResult) < maxThumbnailGenerators { + + activeThumbnailGeneration.Lock() + activeThumbnailGeneration.PathToResult[string(hash)] = nil + activeThumbnailGeneration.Unlock() + + defer func() { + activeThumbnailGeneration.Lock() + delete(activeThumbnailGeneration.PathToResult, string(hash)) + activeThumbnailGeneration.Unlock() + }() + + width, height, err := thumbnailer.CreateThumbnailFromFile(src, dst, size, logger) + if err != nil { + logger.WithError(err).Error("unable to create thumbnail") + return 0, 0, err + } + return width, height, nil + } + + select { + case <-timeout: + logger.Error("timed out waiting for thumbnail generator") + return 0, 0, ErrorTimeoutThumbnailGenerator + default: + time.Sleep(time.Second) + } + } +} + +func storeUrlPreviewResponse(ctx context.Context, cfg *config.MediaAPI, db storage.Database, user userapi.Device, hash types.Base64Hash, preview *types.UrlPreview, logger *log.Entry) error { + + jsonPreview, err := json.Marshal(preview) + if err != nil { + return err + } + + _, bytesWritten, tmpDir, err := fileutils.WriteTempFile(ctx, bytes.NewReader(jsonPreview), cfg.AbsBasePath) + if err != nil { + return err + } + defer fileutils.RemoveDir(tmpDir, logger) + + r := &uploadRequest{ + MediaMetadata: &types.MediaMetadata{ + Origin: cfg.Matrix.ServerName, + }, + Logger: logger, + } + + mediaID, err := r.generateMediaID(ctx, db) + if err != nil { + return err + } + + mediaMetaData := &types.MediaMetadata{ + MediaID: mediaID, + Origin: cfg.Matrix.ServerName, + ContentType: "application/json", + FileSizeBytes: types.FileSizeBytes(bytesWritten), + UploadName: types.Filename("url_preview.json"), + CreationTimestamp: spec.Timestamp(time.Now().Unix()), + Base64Hash: hash, + UserID: types.MatrixUserID(user.UserID), + } + + _, _, err = fileutils.MoveFileWithHashCheck(tmpDir, mediaMetaData, cfg.AbsBasePath, logger) + if err != nil { + return err + } + + err = db.StoreMediaMetadata(ctx, mediaMetaData) + if err != nil { + logger.WithError(err).Error("unable to store media metadata") + return err + } + return nil +} + +func loadUrlPreviewResponse(ctx context.Context, cfg *config.MediaAPI, db storage.Database, hash types.Base64Hash) (*types.UrlPreview, error) { + if mediaMetadata, err := db.GetMediaMetadataByHash(ctx, hash, cfg.Matrix.ServerName); err == nil && mediaMetadata != nil { + // Get the response file + filePath, err := fileutils.GetPathFromBase64Hash(mediaMetadata.Base64Hash, cfg.AbsBasePath) + if err != nil { + return nil, err + } + data, err := os.ReadFile(string(filePath)) + if err != nil { + return nil, err + } + var preview types.UrlPreview + err = json.Unmarshal(data, &preview) + if err != nil { + return nil, err + } + return &preview, nil + } + return nil, ErrNoMetadataFound +} + +func detectFileType(filePath string, logger *log.Entry) (string, error) { + // Check if the file is an image. + // Otherwise return an error + file, err := os.Open(string(filePath)) + if err != nil { + logger.WithError(err).Error("unable to open image file") + return "", err + } + defer file.Close() // nolint: errcheck + + buf := make([]byte, 512) + + _, err = file.Read(buf) + if err != nil { + logger.WithError(err).Error("unable to read file") + return "", err + } + + fileType := http.DetectContentType(buf) + if !strings.HasPrefix(fileType, "image") { + logger.WithField("contentType", fileType).Debugf("uploaded file is not an image") + return "", ErrorUnsupportedContentType + } + return fileType, nil +} + +func getHashFromString(s string) types.Base64Hash { + hasher := sha256.New() + hasher.Write([]byte(s)) + return types.Base64Hash(base64.RawURLEncoding.EncodeToString(hasher.Sum(nil))) +} + +func getMetaFieldsFromHTML(resp *http.Response) map[string]string { + htmlTokens := html.NewTokenizer(resp.Body) + ogValues := map[string]string{} + fieldsToGet := []string{ + "og:title", + "og:description", + "og:image", + "og:image:url", + "og:image:secure_url", + "og:type", + "og:url", + } + fieldsMap := make(map[string]bool, len(fieldsToGet)) + for _, field := range fieldsToGet { + fieldsMap[field] = true + ogValues[field] = "" + } + + headTagOpened := false + for { + tokenType := htmlTokens.Next() + if tokenType == html.ErrorToken { + break + } + token := htmlTokens.Token() + + // Check if there was opened a head tag + if tokenType == html.StartTagToken && token.Data == "head" { + headTagOpened = true + } + // We search for meta tags only inside the head tag if it exists + if headTagOpened && tokenType == html.EndTagToken && token.Data == "head" { + break + } + if (tokenType == html.SelfClosingTagToken || tokenType == html.StartTagToken) && token.Data == "meta" { + var propertyName string + var propertyContent string + for _, attr := range token.Attr { + if attr.Key == "property" { + propertyName = attr.Val + } + if attr.Key == "content" { + propertyContent = attr.Val + } + if propertyName != "" && propertyContent != "" { + break + } + } + // Push the values to the map if they are in the required fields list + if propertyName != "" && propertyContent != "" { + if _, ok := fieldsMap[propertyName]; ok { + ogValues[propertyName] = propertyContent + } + } + } + } + return ogValues +} + +func createUrlBlackList(cfg *config.MediaAPI) []*regexp.Regexp { + blackList := make([]*regexp.Regexp, len(cfg.UrlPreviewBlacklist)) + for i, pattern := range cfg.UrlPreviewBlacklist { + blackList[i] = regexp.MustCompile(pattern) + } + return blackList +} + +func checkURLBlacklisted(blacklist []*regexp.Regexp, url string) bool { + // Check if the url is in the blacklist + for _, pattern := range blacklist { + if pattern.MatchString(url) { + return true + } + } + return false +} diff --git a/mediaapi/routing/url_preview_test.go b/mediaapi/routing/url_preview_test.go new file mode 100644 index 0000000000..6a46e0b6ff --- /dev/null +++ b/mediaapi/routing/url_preview_test.go @@ -0,0 +1,375 @@ +package routing + +import ( + "context" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/url" + "os" + "path/filepath" + "reflect" + "strings" + "sync" + "testing" + "time" + + "github.com/matrix-org/dendrite/internal/httputil" + "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/matrix-org/dendrite/mediaapi/fileutils" + "github.com/matrix-org/dendrite/mediaapi/storage" + "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/matrix-org/dendrite/setup/config" + userapi "github.com/matrix-org/dendrite/userapi/api" + log "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" +) + +var tests = []map[string]interface{}{ + { + "test": ` + + Title + + + + + + + + + + `, + "expected": map[string]string{ + "og:title": "test_title", + "og:description": "test_description", + "og:image": "test.png", + "og:image:url": "test2.png", + "og:image:secure_url": "test3.png", + "og:type": "image/jpeg", + "og:url": "/image.jpg", + }, + }, +} + +func Test_getMetaFieldsFromHTML(t *testing.T) { + for _, test := range tests { + r := &http.Response{Body: io.NopCloser(strings.NewReader(test["test"].(string)))} + result := getMetaFieldsFromHTML(r) + fmt.Println(result) + for k, v := range test["expected"].(map[string]string) { + if val, ok := result[k]; ok { + if val != v { + t.Errorf("Values don't match: expected %s, got %s", v, val) + } + } else { + t.Errorf("Not found %s in the test HTML", k) + } + } + } +} + +func Test_LoadStorePreview(t *testing.T) { + + wd, err := os.Getwd() + if err != nil { + t.Errorf("failed to get current working directory: %v", err) + } + + maxSize := config.FileSizeBytes(8) + logger := log.New().WithField("mediaapi", "test") + testdataPath := filepath.Join(wd, "./testdata") + + g := &config.Global{} + g.Defaults(config.DefaultOpts{Generate: true}) + cfg := &config.MediaAPI{ + Matrix: g, + MaxFileSizeBytes: maxSize, + BasePath: config.Path(testdataPath), + AbsBasePath: config.Path(testdataPath), + DynamicThumbnails: false, + } + + // create testdata folder and remove when done + _ = os.Mkdir(testdataPath, os.ModePerm) + defer fileutils.RemoveDir(types.Path(testdataPath), nil) + cm := sqlutil.NewConnectionManager(nil, config.DatabaseOptions{}) + db, err := storage.NewMediaAPIDatasource(cm, &config.DatabaseOptions{ + ConnectionString: "file::memory:?cache=shared", + MaxOpenConnections: 100, + MaxIdleConnections: 2, + ConnMaxLifetimeSeconds: -1, + }) + if err != nil { + t.Errorf("error opening mediaapi database: %v", err) + } + + testPreview := &types.UrlPreview{ + Title: "test_title", + Description: "test_description", + ImageUrl: "test_url.png", + ImageType: "image/png", + ImageSize: types.FileSizeBytes(100), + ImageHeight: 100, + ImageWidth: 100, + Type: "video", + Url: "video.avi", + } + + hash := getHashFromString("testhash") + device := userapi.Device{ + ID: "1", + UserID: "user", + } + err = storeUrlPreviewResponse(context.Background(), cfg, db, device, hash, testPreview, logger) + if err != nil { + t.Errorf("Can't store urel preview response: %v", err) + } + + filePath, err := fileutils.GetPathFromBase64Hash(hash, cfg.AbsBasePath) + if err != nil { + t.Errorf("Can't get stored file path: %v", err) + } + _, err = os.Stat(filePath) + if err != nil { + t.Errorf("Can't get stored file info: %v", err) + + } + + loadedPreview, err := loadUrlPreviewResponse(context.Background(), cfg, db, hash) + if err != nil { + t.Errorf("Can't load the preview: %v", err) + } + + if !reflect.DeepEqual(loadedPreview, testPreview) { + t.Errorf("Stored and loaded previews not equal: stored=%v, loaded=%v", testPreview, loadedPreview) + } +} + +func Test_Blacklist(t *testing.T) { + + tests := map[string]interface{}{ + "entrys": []string{ + "drive.google.com", + "https?://altavista.com/someurl", + "https?://(www.)?google.com", + "http://stackoverflow.com", + }, + "tests": map[string]bool{ + "https://drive.google.com/path": true, + "http://altavista.com": false, + "http://altavista.com/someurl": true, + "https://altavista.com/someurl": true, + "https://stackoverflow.com": false, + }, + } + + cfg := &config.MediaAPI{ + UrlPreviewBlacklist: tests["entrys"].([]string), + } + blacklist := createUrlBlackList(cfg) + + for url, expected := range tests["tests"].(map[string]bool) { + value := checkURLBlacklisted(blacklist, url) + if value != expected { + t.Errorf("Blacklist %v: expected=%v, got=%v", url, expected, value) + } + } +} + +func Test_ActiveRequestWaiting(t *testing.T) { + activeRequests := &types.ActiveUrlPreviewRequests{ + Url: map[string]*types.UrlPreviewResult{ + "someurl": &types.UrlPreviewResult{ + Cond: sync.NewCond(&sync.Mutex{}), + Preview: &types.UrlPreview{}, + Error: nil, + }, + }, + } + + successResults := 0 + successResultsLock := &sync.Mutex{} + + for i := 0; i < 3; i++ { + go func() { + if res, ok := checkActivePreviewResponse(activeRequests, "someurl"); ok { + if res.Code != 200 { + t.Errorf("Unsuccess result: %v", res) + } + successResultsLock.Lock() + defer successResultsLock.Unlock() + successResults++ + return + } + t.Errorf("url %v not found in active requests", "someurl") + }() + } + + time.Sleep(time.Duration(1) * time.Second) + successResultsLock.Lock() + if successResults != 0 { + t.Error("Subroutines didn't wait") + } + successResultsLock.Unlock() + activeRequests.Url["someurl"].Cond.Broadcast() + to := time.After(1 * time.Second) + for { + select { + case <-to: + t.Errorf("Test timed out, results=%v", successResults) + return + default: + } + successResultsLock.Lock() + if successResults == 3 { + break + } + successResultsLock.Unlock() + } +} + +func Test_UrlPreviewHandler(t *testing.T) { + wd, err := os.Getwd() + if err != nil { + t.Errorf("failed to get current working directory: %v", err) + } + + maxSize := config.FileSizeBytes(1024 * 1024) + testdataPath := filepath.Join(wd, "./testdata") + + g := &config.Global{} + g.Defaults(config.DefaultOpts{Generate: true}) + cfg := &config.MediaAPI{ + Matrix: g, + MaxFileSizeBytes: maxSize, + BasePath: config.Path(testdataPath), + AbsBasePath: config.Path(testdataPath), + DynamicThumbnails: false, + } + cfg2 := &config.MediaAPI{ + Matrix: g, + MaxFileSizeBytes: maxSize, + BasePath: config.Path(testdataPath), + AbsBasePath: config.Path(testdataPath), + UrlPreviewThumbnailSize: config.ThumbnailSize{ + Width: 10, + Height: 10, + }, + MaxThumbnailGenerators: 10, + DynamicThumbnails: false, + } + + // create testdata folder and remove when done + _ = os.Mkdir(testdataPath, os.ModePerm) + defer fileutils.RemoveDir(types.Path(testdataPath), nil) + cm := sqlutil.NewConnectionManager(nil, config.DatabaseOptions{}) + db, err := storage.NewMediaAPIDatasource(cm, &config.DatabaseOptions{ + ConnectionString: "file::memory:?cache=shared", + MaxOpenConnections: 100, + MaxIdleConnections: 2, + ConnMaxLifetimeSeconds: -1, + }) + if err != nil { + t.Errorf("error opening mediaapi database: %v", err) + } + db2, err2 := storage.NewMediaAPIDatasource(cm, &config.DatabaseOptions{ + ConnectionString: "file::memory:", + MaxOpenConnections: 100, + MaxIdleConnections: 2, + ConnMaxLifetimeSeconds: -1, + }) + if err2 != nil { + t.Errorf("error opening mediaapi database: %v", err) + } + + activeThumbnailGeneration := &types.ActiveThumbnailGeneration{ + PathToResult: map[string]*types.ThumbnailGenerationResult{}, + } + rateLimits := &httputil.RateLimits{} + device := userapi.Device{ + ID: "1", + UserID: "user", + } + + handler := makeUrlPreviewHandler(cfg, rateLimits, db, activeThumbnailGeneration) + // this handler is to test filecache + handler2 := makeUrlPreviewHandler(cfg, rateLimits, db, activeThumbnailGeneration) + // this handler is to test image resize + handler3 := makeUrlPreviewHandler(cfg2, rateLimits, db2, activeThumbnailGeneration) + + responseBody := ` + + Title + + + + + + + ` + + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.RequestURI == "/test.png" || r.RequestURI == "/test2.png" { + w.Header().Add("Content-Type", "image/jpeg") + http.ServeFile(w, r, "../bimg-96x96-crop.jpg") + return + } + w.Write([]byte(responseBody)) + })) + + ur, _ := url.Parse("/?url=" + srv.URL) + req := &http.Request{ + Method: "GET", + URL: ur, + } + result := handler(req, &device) + assert.Equal(t, result.Code, 200, "Response code mismatch") + assert.Equal(t, result.JSON.(*types.UrlPreview).Title, "test_title") + assert.Equal(t, result.JSON.(*types.UrlPreview).ImageUrl[:6], "mxc://", "Image response not found") + assert.Greater(t, result.JSON.(*types.UrlPreview).ImageSize, types.FileSizeBytes(0), "Image size missmatch") + + // Test only image response + ur2, _ := url.Parse("/?url=" + srv.URL + "/test.png") + result = handler(&http.Request{ + Method: "GET", + URL: ur2, + }, &device) + assert.Equal(t, result.Code, 200, "Response code mismatch") + assert.Equal(t, result.JSON.(*types.UrlPreview).Title, "") + assert.Equal(t, result.JSON.(*types.UrlPreview).ImageUrl[:6], "mxc://", "Image response not found") + assert.Greater(t, result.JSON.(*types.UrlPreview).ImageHeight, int(0), "height missmatch") + assert.Greater(t, result.JSON.(*types.UrlPreview).ImageWidth, int(0), "width missmatch") + + srcSize := result.JSON.(*types.UrlPreview).ImageSize + srcHeight := result.JSON.(*types.UrlPreview).ImageHeight + srcWidth := result.JSON.(*types.UrlPreview).ImageWidth + + // Test image resize + ur3, _ := url.Parse("/?url=" + srv.URL + "/test2.png") + result = handler3(&http.Request{ + Method: "GET", + URL: ur3, + }, &device) + assert.Equal(t, result.Code, 200, "Response code mismatch") + assert.Equal(t, result.JSON.(*types.UrlPreview).ImageUrl[:6], "mxc://", "Image response not found") + assert.Less(t, result.JSON.(*types.UrlPreview).ImageSize, srcSize, "thumbnail file size missmatch") + assert.Less(t, result.JSON.(*types.UrlPreview).ImageHeight, srcHeight, "thumbnail height missmatch") + assert.Less(t, result.JSON.(*types.UrlPreview).ImageWidth, srcWidth, "thumbnail width missmatch") + + srv.Close() + + // Test in-memory cache + result = handler(req, &device) + assert.Equal(t, result.Code, 200, "Response code mismatch") + assert.Equal(t, result.JSON.(*types.UrlPreview).Title, "test_title") + assert.Equal(t, result.JSON.(*types.UrlPreview).ImageUrl[:6], "mxc://", "Image response not found") + + // Test response file cache + result = handler2(req, &device) + assert.Equal(t, result.Code, 200, "Response code mismatch") + assert.Equal(t, result.JSON.(*types.UrlPreview).Title, "test_title") + assert.Equal(t, result.JSON.(*types.UrlPreview).ImageUrl[:6], "mxc://", "Image response not found") + +} diff --git a/mediaapi/storage/interface.go b/mediaapi/storage/interface.go index cf3e7df571..e4a808e587 100644 --- a/mediaapi/storage/interface.go +++ b/mediaapi/storage/interface.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage import ( "context" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/mediaapi/storage/postgres/media_repository_table.go b/mediaapi/storage/postgres/media_repository_table.go index 0583dd0175..64936b3db7 100644 --- a/mediaapi/storage/postgres/media_repository_table.go +++ b/mediaapi/storage/postgres/media_repository_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,9 +12,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/tables" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/tables" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/mediaapi/storage/postgres/mediaapi.go b/mediaapi/storage/postgres/mediaapi.go index e2a2b25ce2..199514df17 100644 --- a/mediaapi/storage/postgres/mediaapi.go +++ b/mediaapi/storage/postgres/mediaapi.go @@ -1,26 +1,18 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres import ( // Import the postgres database driver. + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/shared" + "github.com/element-hq/dendrite/setup/config" _ "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/shared" - "github.com/matrix-org/dendrite/setup/config" ) // NewDatabase opens a postgres database. diff --git a/mediaapi/storage/postgres/thumbnail_table.go b/mediaapi/storage/postgres/thumbnail_table.go index 8544855288..4165165845 100644 --- a/mediaapi/storage/postgres/thumbnail_table.go +++ b/mediaapi/storage/postgres/thumbnail_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,10 +12,10 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/tables" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/tables" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/mediaapi/storage/shared/mediaapi.go b/mediaapi/storage/shared/mediaapi.go index bdd7f317b6..ef8335b771 100644 --- a/mediaapi/storage/shared/mediaapi.go +++ b/mediaapi/storage/shared/mediaapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared @@ -19,9 +11,9 @@ import ( "database/sql" "errors" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/tables" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/tables" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/mediaapi/storage/sqlite3/media_repository_table.go b/mediaapi/storage/sqlite3/media_repository_table.go index 625688cd77..cca6773bdc 100644 --- a/mediaapi/storage/sqlite3/media_repository_table.go +++ b/mediaapi/storage/sqlite3/media_repository_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,9 +12,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/tables" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/tables" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/mediaapi/storage/sqlite3/mediaapi.go b/mediaapi/storage/sqlite3/mediaapi.go index 086beb8e2e..467450725e 100644 --- a/mediaapi/storage/sqlite3/mediaapi.go +++ b/mediaapi/storage/sqlite3/mediaapi.go @@ -1,25 +1,17 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 import ( // Import the postgres database driver. - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/shared" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/shared" + "github.com/element-hq/dendrite/setup/config" ) // NewDatabase opens a SQLIte database. diff --git a/mediaapi/storage/sqlite3/thumbnail_table.go b/mediaapi/storage/sqlite3/thumbnail_table.go index 259d55b73c..2d255f79b4 100644 --- a/mediaapi/storage/sqlite3/thumbnail_table.go +++ b/mediaapi/storage/sqlite3/thumbnail_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,10 +12,10 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/tables" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/tables" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/mediaapi/storage/storage.go b/mediaapi/storage/storage.go index 71ab72077b..0805b930ef 100644 --- a/mediaapi/storage/storage.go +++ b/mediaapi/storage/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm @@ -20,10 +12,10 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/postgres" - "github.com/matrix-org/dendrite/mediaapi/storage/sqlite3" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/postgres" + "github.com/element-hq/dendrite/mediaapi/storage/sqlite3" + "github.com/element-hq/dendrite/setup/config" ) // NewMediaAPIDatasource opens a database connection. diff --git a/mediaapi/storage/storage_test.go b/mediaapi/storage/storage_test.go index 8cd29a54db..b87f9f1384 100644 --- a/mediaapi/storage/storage_test.go +++ b/mediaapi/storage/storage_test.go @@ -5,11 +5,11 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" ) func mustCreateDatabase(t *testing.T, dbType test.DBType) (storage.Database, func()) { diff --git a/mediaapi/storage/storage_wasm.go b/mediaapi/storage/storage_wasm.go index 47ee3792c6..b397a5e484 100644 --- a/mediaapi/storage/storage_wasm.go +++ b/mediaapi/storage/storage_wasm.go @@ -1,25 +1,17 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/mediaapi/storage/sqlite3" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/mediaapi/storage/sqlite3" + "github.com/element-hq/dendrite/setup/config" ) // Open opens a postgres database. diff --git a/mediaapi/storage/tables/interface.go b/mediaapi/storage/tables/interface.go index 2ff8039b4a..b5242e7e99 100644 --- a/mediaapi/storage/tables/interface.go +++ b/mediaapi/storage/tables/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package tables @@ -18,7 +10,7 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/mediaapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/mediaapi/thumbnailer/thumbnailer.go b/mediaapi/thumbnailer/thumbnailer.go index 58407ce8b7..31f616daa1 100644 --- a/mediaapi/thumbnailer/thumbnailer.go +++ b/mediaapi/thumbnailer/thumbnailer.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package thumbnailer @@ -22,9 +14,9 @@ import ( "path/filepath" "sync" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" log "github.com/sirupsen/logrus" ) diff --git a/mediaapi/thumbnailer/thumbnailer_bimg.go b/mediaapi/thumbnailer/thumbnailer_bimg.go index fa1acbf084..e2c297b5eb 100644 --- a/mediaapi/thumbnailer/thumbnailer_bimg.go +++ b/mediaapi/thumbnailer/thumbnailer_bimg.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build bimg // +build bimg @@ -22,9 +14,9 @@ import ( "os" "time" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" log "github.com/sirupsen/logrus" "gopkg.in/h2non/bimg.v1" ) diff --git a/mediaapi/thumbnailer/thumbnailer_nfnt.go b/mediaapi/thumbnailer/thumbnailer_nfnt.go index beae88c5c7..0736968295 100644 --- a/mediaapi/thumbnailer/thumbnailer_nfnt.go +++ b/mediaapi/thumbnailer/thumbnailer_nfnt.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !bimg // +build !bimg @@ -19,6 +11,7 @@ package thumbnailer import ( "context" + "errors" "image" "image/draw" @@ -35,13 +28,15 @@ import ( "os" "time" - "github.com/matrix-org/dendrite/mediaapi/storage" - "github.com/matrix-org/dendrite/mediaapi/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/mediaapi/storage" + "github.com/element-hq/dendrite/mediaapi/types" + "github.com/element-hq/dendrite/setup/config" "github.com/nfnt/resize" log "github.com/sirupsen/logrus" ) +var ErrThumbnailTooLarge = errors.New("thumbnail is larger than original") + // GenerateThumbnails generates the configured thumbnail sizes for the source file func GenerateThumbnails( ctx context.Context, @@ -274,3 +269,44 @@ func adjustSize(dst types.Path, img image.Image, w, h int, crop bool, logger *lo return out.Bounds().Max.X, out.Bounds().Max.Y, nil } + +func CreateThumbnailFromFile( + src types.Path, + dst types.Path, + config types.ThumbnailSize, + logger *log.Entry, +) (width int, height int, err error) { + img, err := readFile(string(src)) + if err != nil { + logger.WithError(err).WithFields(log.Fields{ + "src": src, + }).Error("Failed to read image") + return 0, 0, err + } + + // Check if request is larger than original + if config.Width >= img.Bounds().Dx() && config.Height >= img.Bounds().Dy() { + return img.Bounds().Dx(), img.Bounds().Dy(), ErrThumbnailTooLarge + } + + start := time.Now() + width, height, err = adjustSize(dst, img, config.Width, config.Height, config.ResizeMethod == types.Crop, logger) + if err != nil { + return 0, 0, err + } + logger.WithFields(log.Fields{ + "ActualWidth": width, + "ActualHeight": height, + "processTime": time.Since(start), + }).Info("Generated thumbnail") + + return width, height, nil +} + +func GetImageSize(src string) (width int, height int, err error) { + img, err := readFile(src) + if err != nil { + return 0, 0, err + } + return img.Bounds().Dx(), img.Bounds().Dy(), nil +} diff --git a/mediaapi/types/types.go b/mediaapi/types/types.go index e1c29e0f66..942e15ab92 100644 --- a/mediaapi/types/types.go +++ b/mediaapi/types/types.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package types import ( "sync" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) @@ -100,6 +92,40 @@ type ActiveThumbnailGeneration struct { PathToResult map[string]*ThumbnailGenerationResult } +type UrlPreviewCache struct { + sync.Mutex + Records map[string]*UrlPreviewCacheRecord +} + +type UrlPreviewCacheRecord struct { + Created int64 + Preview *UrlPreview + Error error +} + +type UrlPreview struct { + ImageSize FileSizeBytes `json:"matrix:image:size"` + Description string `json:"og:description"` + ImageUrl string `json:"og:image"` + ImageType ContentType `json:"og:image:type"` + ImageHeight int `json:"og:image:height"` + ImageWidth int `json:"og:image:width"` + Title string `json:"og:title"` + Type string `json:"og:type"` + Url string `json:"og:url"` +} + +type UrlPreviewResult struct { + Cond *sync.Cond + Preview *UrlPreview + Error error +} + +type ActiveUrlPreviewRequests struct { + sync.Mutex + Url map[string]*UrlPreviewResult +} + // Crop indicates we should crop the thumbnail on resize const Crop = "crop" diff --git a/relayapi/api/api.go b/relayapi/api/api.go index 83ff2890bc..e3aaa46c0c 100644 --- a/relayapi/api/api.go +++ b/relayapi/api/api.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api diff --git a/relayapi/internal/api.go b/relayapi/internal/api.go index 603309cf3c..ea5903ddd9 100644 --- a/relayapi/internal/api.go +++ b/relayapi/internal/api.go @@ -1,25 +1,17 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal import ( "sync" - "github.com/matrix-org/dendrite/federationapi/producers" - "github.com/matrix-org/dendrite/relayapi/storage" - rsAPI "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/federationapi/producers" + "github.com/element-hq/dendrite/relayapi/storage" + rsAPI "github.com/element-hq/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/internal/perform.go b/relayapi/internal/perform.go index 79d600abf6..d24831e29b 100644 --- a/relayapi/internal/perform.go +++ b/relayapi/internal/perform.go @@ -1,25 +1,17 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal import ( "context" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/relayapi/api" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/relayapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/internal/perform_test.go b/relayapi/internal/perform_test.go index f97c5aa9e2..545abb9419 100644 --- a/relayapi/internal/perform_test.go +++ b/relayapi/internal/perform_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -19,9 +11,9 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/shared" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/shared" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/relayapi.go b/relayapi/relayapi.go index 4402274954..dc4df4c9b0 100644 --- a/relayapi/relayapi.go +++ b/relayapi/relayapi.go @@ -1,30 +1,22 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package relayapi import ( - "github.com/matrix-org/dendrite/federationapi/producers" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/api" - "github.com/matrix-org/dendrite/relayapi/internal" - "github.com/matrix-org/dendrite/relayapi/routing" - "github.com/matrix-org/dendrite/relayapi/storage" - rsAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/federationapi/producers" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/api" + "github.com/element-hq/dendrite/relayapi/internal" + "github.com/element-hq/dendrite/relayapi/routing" + "github.com/element-hq/dendrite/relayapi/storage" + rsAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/sirupsen/logrus" diff --git a/relayapi/relayapi_test.go b/relayapi/relayapi_test.go index 9d67cdf954..d27111bced 100644 --- a/relayapi/relayapi_test.go +++ b/relayapi/relayapi_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package relayapi_test @@ -23,14 +15,14 @@ import ( "testing" "time" + "github.com/element-hq/dendrite/cmd/dendrite-demo-yggdrasil/signing" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/signing" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/routing/relaytxn.go b/relayapi/routing/relaytxn.go index 2f3225b627..066b1b9c62 100644 --- a/relayapi/routing/relaytxn.go +++ b/relayapi/routing/relaytxn.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,7 +10,7 @@ import ( "encoding/json" "net/http" - "github.com/matrix-org/dendrite/relayapi/api" + "github.com/element-hq/dendrite/relayapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/relayapi/routing/relaytxn_test.go b/relayapi/routing/relaytxn_test.go index 1041d8e7e1..48a96b0c1c 100644 --- a/relayapi/routing/relaytxn_test.go +++ b/relayapi/routing/relaytxn_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing_test @@ -19,11 +11,11 @@ import ( "net/http" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/internal" - "github.com/matrix-org/dendrite/relayapi/routing" - "github.com/matrix-org/dendrite/relayapi/storage/shared" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/internal" + "github.com/element-hq/dendrite/relayapi/routing" + "github.com/element-hq/dendrite/relayapi/storage/shared" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/routing/routing.go b/relayapi/routing/routing.go index 92476d6c2e..abb397151c 100644 --- a/relayapi/routing/routing.go +++ b/relayapi/routing/routing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -19,11 +11,11 @@ import ( "net/http" "time" + "github.com/element-hq/dendrite/internal/httputil" + relayInternal "github.com/element-hq/dendrite/relayapi/internal" + "github.com/element-hq/dendrite/setup/config" "github.com/getsentry/sentry-go" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/httputil" - relayInternal "github.com/matrix-org/dendrite/relayapi/internal" - "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/routing/sendrelay.go b/relayapi/routing/sendrelay.go index 4a742dede8..96342cd80d 100644 --- a/relayapi/routing/sendrelay.go +++ b/relayapi/routing/sendrelay.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,7 +10,7 @@ import ( "encoding/json" "net/http" - "github.com/matrix-org/dendrite/relayapi/api" + "github.com/element-hq/dendrite/relayapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/routing/sendrelay_test.go b/relayapi/routing/sendrelay_test.go index cac109e19f..9d046e126c 100644 --- a/relayapi/routing/sendrelay_test.go +++ b/relayapi/routing/sendrelay_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing_test @@ -20,11 +12,11 @@ import ( "net/http" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/internal" - "github.com/matrix-org/dendrite/relayapi/routing" - "github.com/matrix-org/dendrite/relayapi/storage/shared" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/internal" + "github.com/element-hq/dendrite/relayapi/routing" + "github.com/element-hq/dendrite/relayapi/storage/shared" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/relayapi/storage/interface.go b/relayapi/storage/interface.go index bc1722cd9f..269a1430c1 100644 --- a/relayapi/storage/interface.go +++ b/relayapi/storage/interface.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage import ( "context" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/relayapi/storage/postgres/relay_queue_json_table.go b/relayapi/storage/postgres/relay_queue_json_table.go index 94ae414077..cc15a5ed14 100644 --- a/relayapi/storage/postgres/relay_queue_json_table.go +++ b/relayapi/storage/postgres/relay_queue_json_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,9 +10,9 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" ) const relayQueueJSONSchema = ` diff --git a/relayapi/storage/postgres/relay_queue_table.go b/relayapi/storage/postgres/relay_queue_table.go index 5873af7609..79d5ecd8da 100644 --- a/relayapi/storage/postgres/relay_queue_table.go +++ b/relayapi/storage/postgres/relay_queue_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,9 +10,9 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/relayapi/storage/postgres/storage.go b/relayapi/storage/postgres/storage.go index dd30c1b563..bef7482b0e 100644 --- a/relayapi/storage/postgres/storage.go +++ b/relayapi/storage/postgres/storage.go @@ -1,26 +1,18 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres import ( "database/sql" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/shared" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/shared" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/relayapi/storage/shared/storage.go b/relayapi/storage/shared/storage.go index fc1f12e746..456158caa0 100644 --- a/relayapi/storage/shared/storage.go +++ b/relayapi/storage/shared/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared @@ -20,10 +12,10 @@ import ( "encoding/json" "fmt" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/tables" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/tables" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/relayapi/storage/sqlite3/relay_queue_json_table.go b/relayapi/storage/sqlite3/relay_queue_json_table.go index a1af82aa00..3a8418acf0 100644 --- a/relayapi/storage/sqlite3/relay_queue_json_table.go +++ b/relayapi/storage/sqlite3/relay_queue_json_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,8 +12,8 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" ) const relayQueueJSONSchema = ` diff --git a/relayapi/storage/sqlite3/relay_queue_table.go b/relayapi/storage/sqlite3/relay_queue_table.go index 30482ae973..1cd822512a 100644 --- a/relayapi/storage/sqlite3/relay_queue_table.go +++ b/relayapi/storage/sqlite3/relay_queue_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,8 +12,8 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/relayapi/storage/sqlite3/storage.go b/relayapi/storage/sqlite3/storage.go index 69df401e61..a4d1883a4b 100644 --- a/relayapi/storage/sqlite3/storage.go +++ b/relayapi/storage/sqlite3/storage.go @@ -1,26 +1,18 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 import ( "database/sql" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/shared" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/shared" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/relayapi/storage/storage.go b/relayapi/storage/storage.go index 4eccd002d0..0a2b63f478 100644 --- a/relayapi/storage/storage.go +++ b/relayapi/storage/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm @@ -20,11 +12,11 @@ package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/postgres" - "github.com/matrix-org/dendrite/relayapi/storage/sqlite3" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/postgres" + "github.com/element-hq/dendrite/relayapi/storage/sqlite3" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/relayapi/storage/storage_wasm.go b/relayapi/storage/storage_wasm.go index 7e73233477..86ba972a9d 100644 --- a/relayapi/storage/storage_wasm.go +++ b/relayapi/storage/storage_wasm.go @@ -1,26 +1,18 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage import ( "fmt" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/sqlite3" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/sqlite3" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/relayapi/storage/tables/interface.go b/relayapi/storage/tables/interface.go index 27f43a8d52..41b4cccc42 100644 --- a/relayapi/storage/tables/interface.go +++ b/relayapi/storage/tables/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package tables diff --git a/relayapi/storage/tables/relay_queue_json_table_test.go b/relayapi/storage/tables/relay_queue_json_table_test.go index 97af7eaeb9..e3951a4f55 100644 --- a/relayapi/storage/tables/relay_queue_json_table_test.go +++ b/relayapi/storage/tables/relay_queue_json_table_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package tables_test @@ -20,12 +12,12 @@ import ( "encoding/json" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/postgres" - "github.com/matrix-org/dendrite/relayapi/storage/sqlite3" - "github.com/matrix-org/dendrite/relayapi/storage/tables" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/postgres" + "github.com/element-hq/dendrite/relayapi/storage/sqlite3" + "github.com/element-hq/dendrite/relayapi/storage/tables" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/relayapi/storage/tables/relay_queue_table_test.go b/relayapi/storage/tables/relay_queue_table_test.go index d196eaf574..8c94d5540d 100644 --- a/relayapi/storage/tables/relay_queue_table_test.go +++ b/relayapi/storage/tables/relay_queue_table_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package tables_test @@ -21,12 +13,12 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/relayapi/storage/postgres" - "github.com/matrix-org/dendrite/relayapi/storage/sqlite3" - "github.com/matrix-org/dendrite/relayapi/storage/tables" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/relayapi/storage/postgres" + "github.com/element-hq/dendrite/relayapi/storage/sqlite3" + "github.com/element-hq/dendrite/relayapi/storage/tables" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/roomserver/acls/acls.go b/roomserver/acls/acls.go index 4950e6231a..201f36df78 100644 --- a/roomserver/acls/acls.go +++ b/roomserver/acls/acls.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package acls @@ -23,7 +15,7 @@ import ( "strings" "sync" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/storage/tables" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" diff --git a/roomserver/acls/acls_test.go b/roomserver/acls/acls_test.go index 7fd20f114c..16f3887d25 100644 --- a/roomserver/acls/acls_test.go +++ b/roomserver/acls/acls_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package acls @@ -19,7 +11,7 @@ import ( "regexp" "testing" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/storage/tables" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/roomserver/api/alias.go b/roomserver/api/alias.go index 6269d0b046..7efe409212 100644 --- a/roomserver/api/alias.go +++ b/roomserver/api/alias.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api diff --git a/roomserver/api/api.go b/roomserver/api/api.go index b2b3192447..9493995e16 100644 --- a/roomserver/api/api.go +++ b/roomserver/api/api.go @@ -9,10 +9,10 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - asAPI "github.com/matrix-org/dendrite/appservice/api" - fsAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/roomserver/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + asAPI "github.com/element-hq/dendrite/appservice/api" + fsAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/roomserver/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) // ErrInvalidID is an error returned if the userID is invalid diff --git a/roomserver/api/input.go b/roomserver/api/input.go index 8947ad624c..748e3ac788 100644 --- a/roomserver/api/input.go +++ b/roomserver/api/input.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package api provides the types that are used to communicate with the roomserver. package api @@ -18,7 +10,7 @@ package api import ( "fmt" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/api/output.go b/roomserver/api/output.go index 852b64206d..4a554feefa 100644 --- a/roomserver/api/output.go +++ b/roomserver/api/output.go @@ -1,21 +1,13 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api import ( - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/api/perform.go b/roomserver/api/perform.go index d6caec08c0..e448dcfa99 100644 --- a/roomserver/api/perform.go +++ b/roomserver/api/perform.go @@ -5,7 +5,7 @@ import ( "encoding/json" "time" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/api/query.go b/roomserver/api/query.go index c4c019f99a..2d784048e9 100644 --- a/roomserver/api/query.go +++ b/roomserver/api/query.go @@ -1,18 +1,10 @@ -// Copyright 2017 Vector Creations Ltd +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. // Copyright 2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 +// Copyright 2017 Vector Creations Ltd // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api @@ -26,9 +18,9 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/synctypes" ) // QueryLatestEventsAndStateRequest is a request to QueryLatestEventsAndState diff --git a/roomserver/api/wrapper.go b/roomserver/api/wrapper.go index 4979d18c70..7023e2c2f4 100644 --- a/roomserver/api/wrapper.go +++ b/roomserver/api/wrapper.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api import ( "context" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/roomserver/auth/auth.go b/roomserver/auth/auth.go index d5172dab92..cf1456192a 100644 --- a/roomserver/auth/auth.go +++ b/roomserver/auth/auth.go @@ -1,21 +1,14 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package auth import ( "context" - "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/auth/auth_test.go b/roomserver/auth/auth_test.go index 058361e6ed..e935adadee 100644 --- a/roomserver/auth/auth_test.go +++ b/roomserver/auth/auth_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/internal/alias.go b/roomserver/internal/alias.go index 5ceda7e010..b66cd09a8d 100644 --- a/roomserver/internal/alias.go +++ b/roomserver/internal/alias.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -21,11 +13,11 @@ import ( "fmt" "time" - asAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/types" + asAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/tidwall/gjson" diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go index a71fd2d15b..98bdc7d6da 100644 --- a/roomserver/internal/api.go +++ b/roomserver/internal/api.go @@ -12,21 +12,21 @@ import ( "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" - asAPI "github.com/matrix-org/dendrite/appservice/api" - fsAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/roomserver/acls" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/internal/perform" - "github.com/matrix-org/dendrite/roomserver/internal/query" - "github.com/matrix-org/dendrite/roomserver/producers" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - userapi "github.com/matrix-org/dendrite/userapi/api" + asAPI "github.com/element-hq/dendrite/appservice/api" + fsAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/roomserver/acls" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/internal/perform" + "github.com/element-hq/dendrite/roomserver/internal/query" + "github.com/element-hq/dendrite/roomserver/producers" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + userapi "github.com/element-hq/dendrite/userapi/api" ) // RoomserverInternalAPI is an implementation of api.RoomserverInternalAPI diff --git a/roomserver/internal/helpers/auth.go b/roomserver/internal/helpers/auth.go index 9da751b1a2..e854d1be6f 100644 --- a/roomserver/internal/helpers/auth.go +++ b/roomserver/internal/helpers/auth.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package helpers @@ -22,10 +14,10 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" ) // CheckForSoftFail returns true if the event should be soft-failed diff --git a/roomserver/internal/helpers/auth_test.go b/roomserver/internal/helpers/auth_test.go index 2a1c3ea498..3b5704a3b7 100644 --- a/roomserver/internal/helpers/auth_test.go +++ b/roomserver/internal/helpers/auth_test.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package helpers import ( "testing" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" ) func benchmarkStateEntryMapLookup(entries, lookups int64, b *testing.B) { diff --git a/roomserver/internal/helpers/helpers.go b/roomserver/internal/helpers/helpers.go index b2e21bf546..8b3be0d708 100644 --- a/roomserver/internal/helpers/helpers.go +++ b/roomserver/internal/helpers/helpers.go @@ -11,13 +11,13 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/auth" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/auth" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) // TODO: temporary package which has helper functions used by both internal/perform packages. diff --git a/roomserver/internal/helpers/helpers_test.go b/roomserver/internal/helpers/helpers_test.go index 1cef83df75..02f2aa430e 100644 --- a/roomserver/internal/helpers/helpers_test.go +++ b/roomserver/internal/helpers/helpers_test.go @@ -5,16 +5,16 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/test" ) func mustCreateDatabase(t *testing.T, dbType test.DBType) (storage.Database, func()) { diff --git a/roomserver/internal/input/input.go b/roomserver/internal/input/input.go index 104ce94e56..46cd206add 100644 --- a/roomserver/internal/input/input.go +++ b/roomserver/internal/input/input.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package input contains the code processes new room events package input @@ -23,7 +15,7 @@ import ( "sync" "time" - userapi "github.com/matrix-org/dendrite/userapi/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" @@ -34,16 +26,16 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - fedapi "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/roomserver/acls" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/query" - "github.com/matrix-org/dendrite/roomserver/producers" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" + fedapi "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/roomserver/acls" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/query" + "github.com/element-hq/dendrite/roomserver/producers" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" ) // Inputer is responsible for consuming from the roomserver input diff --git a/roomserver/internal/input/input_events.go b/roomserver/internal/input/input_events.go index 657ca8719f..b84db345e9 100644 --- a/roomserver/internal/input/input_events.go +++ b/roomserver/internal/input/input_events.go @@ -1,18 +1,10 @@ -// Copyright 2017 Vector Creations Ltd +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. // Copyright 2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 +// Copyright 2017 Vector Creations Ltd // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package input @@ -24,7 +16,7 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/storage/tables" "github.com/tidwall/gjson" "github.com/matrix-org/gomatrixserverlib" @@ -34,19 +26,19 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/roomserver/acls" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/acls" + "github.com/element-hq/dendrite/roomserver/internal/helpers" - userAPI "github.com/matrix-org/dendrite/userapi/api" + userAPI "github.com/element-hq/dendrite/userapi/api" - fedapi "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/hooks" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/types" + fedapi "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/hooks" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/types" ) // MaximumMissingProcessingTime is the maximum time we allow "processRoomEvent" to fetch diff --git a/roomserver/internal/input/input_events_test.go b/roomserver/internal/input/input_events_test.go index 4ee6d21106..05dc842ece 100644 --- a/roomserver/internal/input/input_events_test.go +++ b/roomserver/internal/input/input_events_test.go @@ -6,7 +6,7 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/test" ) func Test_EventAuth(t *testing.T) { diff --git a/roomserver/internal/input/input_latest_events.go b/roomserver/internal/input/input_latest_events.go index e9856cc5dc..47ec1d5e40 100644 --- a/roomserver/internal/input/input_latest_events.go +++ b/roomserver/internal/input/input_latest_events.go @@ -1,18 +1,10 @@ -// Copyright 2017 Vector Creations Ltd +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. // Copyright 2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 +// Copyright 2017 Vector Creations Ltd // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package input @@ -25,12 +17,12 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/roomserver/types" ) // updateLatestEvents updates the list of latest events for this room in the database and writes the diff --git a/roomserver/internal/input/input_membership.go b/roomserver/internal/input/input_membership.go index 4cfc2cda9c..2954286233 100644 --- a/roomserver/internal/input/input_membership.go +++ b/roomserver/internal/input/input_membership.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package input @@ -20,12 +12,12 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) // updateMembership updates the current membership and the invites for each diff --git a/roomserver/internal/input/input_missing.go b/roomserver/internal/input/input_missing.go index 21493287e7..fdc37eeec1 100644 --- a/roomserver/internal/input/input_missing.go +++ b/roomserver/internal/input/input_missing.go @@ -13,12 +13,12 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - fedapi "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" + fedapi "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" ) type parsedRespState struct { diff --git a/roomserver/internal/input/input_test.go b/roomserver/internal/input/input_test.go index f435181a03..a12f5ecbfa 100644 --- a/roomserver/internal/input/input_test.go +++ b/roomserver/internal/input/input_test.go @@ -5,15 +5,15 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/internal/perform/perform_admin.go b/roomserver/internal/perform/perform_admin.go index 1b88172343..da8c92a6b9 100644 --- a/roomserver/internal/perform/perform_admin.go +++ b/roomserver/internal/perform/perform_admin.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -21,13 +13,13 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/internal/query" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/internal/query" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/roomserver/internal/perform/perform_backfill.go b/roomserver/internal/perform/perform_backfill.go index dafa58736a..8ad255c22c 100644 --- a/roomserver/internal/perform/perform_backfill.go +++ b/roomserver/internal/perform/perform_backfill.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -23,13 +15,13 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/auth" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/auth" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" ) // the max number of servers to backfill from per request. If this is too low we may fail to backfill when diff --git a/roomserver/internal/perform/perform_create_room.go b/roomserver/internal/perform/perform_create_room.go index 093082f90a..73ae9ff6c0 100644 --- a/roomserver/internal/perform/perform_create_room.go +++ b/roomserver/internal/perform/perform_create_room.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -21,12 +13,12 @@ import ( "fmt" "net/http" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/roomserver/internal/perform/perform_forget.go b/roomserver/internal/perform/perform_forget.go index e970d9a88e..d3c30a6af5 100644 --- a/roomserver/internal/perform/perform_forget.go +++ b/roomserver/internal/perform/perform_forget.go @@ -1,24 +1,16 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform import ( "context" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/storage" ) type Forgetter struct { diff --git a/roomserver/internal/perform/perform_inbound_peek.go b/roomserver/internal/perform/perform_inbound_peek.go index 7fbec37107..16fa7fccec 100644 --- a/roomserver/internal/perform/perform_inbound_peek.go +++ b/roomserver/internal/perform/perform_inbound_peek.go @@ -1,29 +1,20 @@ -// Copyright 2020 New Vector Ltd +// Copyright 2020-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform import ( "context" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/internal/query" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/internal/query" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/roomserver/internal/perform/perform_invite.go b/roomserver/internal/perform/perform_invite.go index 86563e8c35..f609e6ae5c 100644 --- a/roomserver/internal/perform/perform_invite.go +++ b/roomserver/internal/perform/perform_invite.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -19,15 +11,15 @@ import ( "crypto/ed25519" "fmt" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/roomserver/internal/perform/perform_join.go b/roomserver/internal/perform/perform_join.go index 23988e467d..c58d48ff47 100644 --- a/roomserver/internal/perform/perform_join.go +++ b/roomserver/internal/perform/perform_join.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -31,16 +23,16 @@ import ( "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - fsAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - rsAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/internal/query" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + fsAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + rsAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/internal/query" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" ) type Joiner struct { diff --git a/roomserver/internal/perform/perform_leave.go b/roomserver/internal/perform/perform_leave.go index 5bea004458..88da777b8e 100644 --- a/roomserver/internal/perform/perform_leave.go +++ b/roomserver/internal/perform/perform_leave.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -21,21 +13,21 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/eventutil" "github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/sirupsen/logrus" - fsAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/roomserver/api" - rsAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/setup/config" - userapi "github.com/matrix-org/dendrite/userapi/api" + fsAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/roomserver/api" + rsAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/setup/config" + userapi "github.com/element-hq/dendrite/userapi/api" ) type Leaver struct { diff --git a/roomserver/internal/perform/perform_peek.go b/roomserver/internal/perform/perform_peek.go index 88fa2a431f..d15a90ac3a 100644 --- a/roomserver/internal/perform/perform_peek.go +++ b/roomserver/internal/perform/perform_peek.go @@ -1,16 +1,7 @@ -// Copyright 2020 New Vector Ltd +// Copyright 2020-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -20,11 +11,11 @@ import ( "fmt" "strings" - fsAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/setup/config" + fsAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/roomserver/internal/perform/perform_publish.go b/roomserver/internal/perform/perform_publish.go index 297a4a1899..be5e591a65 100644 --- a/roomserver/internal/perform/perform_publish.go +++ b/roomserver/internal/perform/perform_publish.go @@ -1,24 +1,16 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform import ( "context" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/storage" ) type Publisher struct { diff --git a/roomserver/internal/perform/perform_unpeek.go b/roomserver/internal/perform/perform_unpeek.go index 1ea8079d48..db17937ad6 100644 --- a/roomserver/internal/perform/perform_unpeek.go +++ b/roomserver/internal/perform/perform_unpeek.go @@ -1,16 +1,7 @@ -// Copyright 2020 New Vector Ltd +// Copyright 2020-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -19,10 +10,10 @@ import ( "fmt" "strings" - fsAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/input" - "github.com/matrix-org/dendrite/setup/config" + fsAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/internal/perform/perform_upgrade.go b/roomserver/internal/perform/perform_upgrade.go index 9d7c7b5671..cf18924eaf 100644 --- a/roomserver/internal/perform/perform_upgrade.go +++ b/roomserver/internal/perform/perform_upgrade.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package perform @@ -20,10 +12,10 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/roomserver/internal/query/query.go b/roomserver/internal/query/query.go index 886d004920..e5ee8f8321 100644 --- a/roomserver/internal/query/query.go +++ b/roomserver/internal/query/query.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package query @@ -21,25 +13,25 @@ import ( "errors" "fmt" - //"github.com/matrix-org/dendrite/roomserver/internal" - "github.com/matrix-org/dendrite/setup/config" + //"github.com/element-hq/dendrite/roomserver/internal" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - fsAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/roomserver/acls" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal/helpers" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + fsAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/roomserver/acls" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal/helpers" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" ) type Queryer struct { diff --git a/roomserver/internal/query/query_room_hierarchy.go b/roomserver/internal/query/query_room_hierarchy.go index 3fc6131925..2e233aea9c 100644 --- a/roomserver/internal/query/query_room_hierarchy.go +++ b/roomserver/internal/query/query_room_hierarchy.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package query @@ -21,10 +13,10 @@ import ( "fmt" "sort" - fs "github.com/matrix-org/dendrite/federationapi/api" - roomserver "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + fs "github.com/element-hq/dendrite/federationapi/api" + roomserver "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/roomserver/internal/query/query_test.go b/roomserver/internal/query/query_test.go index 296960b2ff..129bb47987 100644 --- a/roomserver/internal/query/query_test.go +++ b/roomserver/internal/query/query_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package query @@ -20,12 +12,12 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/producers/roomevent.go b/roomserver/producers/roomevent.go index 894e6d81b8..ce258dcc06 100644 --- a/roomserver/producers/roomevent.go +++ b/roomserver/producers/roomevent.go @@ -1,30 +1,22 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package producers import ( "encoding/json" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/storage/tables" "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/roomserver/acls" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/roomserver/acls" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/jetstream" ) var keyContentFields = map[string]string{ diff --git a/roomserver/roomserver.go b/roomserver/roomserver.go index 07c5d65619..819102bd82 100644 --- a/roomserver/roomserver.go +++ b/roomserver/roomserver.go @@ -1,30 +1,22 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package roomserver import ( - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/internal" - "github.com/matrix-org/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/internal" + "github.com/element-hq/dendrite/roomserver/storage" ) // NewInternalAPI returns a concrete implementation of the internal API. diff --git a/roomserver/roomserver_test.go b/roomserver/roomserver_test.go index 85312efd91..48911d2bb1 100644 --- a/roomserver/roomserver_test.go +++ b/roomserver/roomserver_test.go @@ -7,35 +7,35 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/internal/input" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/internal/input" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/roomserver/acls" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/userapi" + "github.com/element-hq/dendrite/roomserver/acls" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/userapi" - userAPI "github.com/matrix-org/dendrite/userapi/api" + userAPI "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" - "github.com/matrix-org/dendrite/federationapi" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/syncapi" + "github.com/element-hq/dendrite/federationapi" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/syncapi" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/storage" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/storage" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" ) var testIsBlacklistedOrBackingOff = func(s spec.ServerName) (*statistics.ServerStatistics, error) { @@ -1017,7 +1017,7 @@ func TestUpgrade(t *testing.T) { validateFunc: validate, }, { - name: "custom state is not taken to the new room", // https://github.com/matrix-org/dendrite/issues/2912 + name: "custom state is not taken to the new room", // https://github.com/element-hq/dendrite/issues/2912 upgradeUser: charlie.ID, roomFunc: func(rsAPI api.RoomserverInternalAPI) string { r := test.NewRoom(t, alice, test.RoomVersion(gomatrixserverlib.RoomVersionV6)) diff --git a/roomserver/state/state.go b/roomserver/state/state.go index dfd439a229..9a7669a44a 100644 --- a/roomserver/state/state.go +++ b/roomserver/state/state.go @@ -1,18 +1,10 @@ -// Copyright 2017 Vector Creations Ltd +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. // Copyright 2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 +// Copyright 2017 Vector Creations Ltd // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package state @@ -28,9 +20,9 @@ import ( "github.com/matrix-org/util" "github.com/prometheus/client_golang/prometheus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" ) type StateResolutionStorage interface { diff --git a/roomserver/state/state_test.go b/roomserver/state/state_test.go index c57056786f..3f38fbf016 100644 --- a/roomserver/state/state_test.go +++ b/roomserver/state/state_test.go @@ -1,25 +1,17 @@ -// Copyright 2017 Vector Creations Ltd +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. // Copyright 2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 +// Copyright 2017 Vector Creations Ltd // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package state import ( "testing" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" ) func TestFindDuplicateStateKeys(t *testing.T) { diff --git a/roomserver/storage/interface.go b/roomserver/storage/interface.go index ab105e6f9b..49086dbaf9 100644 --- a/roomserver/storage/interface.go +++ b/roomserver/storage/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -18,14 +10,14 @@ import ( "context" "crypto/ed25519" - "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) type Database interface { diff --git a/roomserver/storage/postgres/deltas/20201028212440_add_forgotten_column.go b/roomserver/storage/postgres/deltas/20201028212440_add_forgotten_column.go index 61d4dba87a..560767b376 100644 --- a/roomserver/storage/postgres/deltas/20201028212440_add_forgotten_column.go +++ b/roomserver/storage/postgres/deltas/20201028212440_add_forgotten_column.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go b/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go index 355c49b141..3c0a3fa005 100644 --- a/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go +++ b/roomserver/storage/postgres/deltas/2021041615092700_state_blocks_refactor.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas @@ -19,8 +11,8 @@ import ( "database/sql" "fmt" + "github.com/element-hq/dendrite/roomserver/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/util" "github.com/sirupsen/logrus" ) diff --git a/roomserver/storage/postgres/deltas/20221027084407_published_appservice.go b/roomserver/storage/postgres/deltas/20221027084407_published_appservice.go index 687ee90245..4213e96110 100644 --- a/roomserver/storage/postgres/deltas/20221027084407_published_appservice.go +++ b/roomserver/storage/postgres/deltas/20221027084407_published_appservice.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/roomserver/storage/postgres/deltas/20230131091021_published_appservice_pkey.go b/roomserver/storage/postgres/deltas/20230131091021_published_appservice_pkey.go index add66446b6..ef0c5bf348 100644 --- a/roomserver/storage/postgres/deltas/20230131091021_published_appservice_pkey.go +++ b/roomserver/storage/postgres/deltas/20230131091021_published_appservice_pkey.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha.go b/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha.go index 1b1dd44d3c..00cc4c66c8 100644 --- a/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha.go +++ b/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas @@ -19,8 +11,8 @@ import ( "database/sql" "fmt" + "github.com/element-hq/dendrite/internal" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/util" ) diff --git a/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha_test.go b/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha_test.go index c79daac5fc..9ff1003b18 100644 --- a/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha_test.go +++ b/roomserver/storage/postgres/deltas/20230516154000_drop_reference_sha_test.go @@ -3,10 +3,10 @@ package deltas import ( "testing" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/postgres/event_json_table.go b/roomserver/storage/postgres/event_json_table.go index 5f069ca10a..a8f5c67a78 100644 --- a/roomserver/storage/postgres/event_json_table.go +++ b/roomserver/storage/postgres/event_json_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const eventJSONSchema = ` diff --git a/roomserver/storage/postgres/event_state_keys_table.go b/roomserver/storage/postgres/event_state_keys_table.go index 338e11b821..01cfdbfd47 100644 --- a/roomserver/storage/postgres/event_state_keys_table.go +++ b/roomserver/storage/postgres/event_state_keys_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,11 +11,11 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" ) const eventStateKeysSchema = ` diff --git a/roomserver/storage/postgres/event_types_table.go b/roomserver/storage/postgres/event_types_table.go index 15ab7fd8e5..cd406c1564 100644 --- a/roomserver/storage/postgres/event_types_table.go +++ b/roomserver/storage/postgres/event_types_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,11 +11,11 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" ) const eventTypesSchema = ` diff --git a/roomserver/storage/postgres/events_table.go b/roomserver/storage/postgres/events_table.go index 180a03cd6d..03215f1917 100644 --- a/roomserver/storage/postgres/events_table.go +++ b/roomserver/storage/postgres/events_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -21,12 +13,12 @@ import ( "fmt" "sort" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" ) const eventsSchema = ` diff --git a/roomserver/storage/postgres/invite_table.go b/roomserver/storage/postgres/invite_table.go index 009fd1ac14..a626cb4eb0 100644 --- a/roomserver/storage/postgres/invite_table.go +++ b/roomserver/storage/postgres/invite_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const inviteSchema = ` diff --git a/roomserver/storage/postgres/membership_table.go b/roomserver/storage/postgres/membership_table.go index 1a96e35270..90babcbfbb 100644 --- a/roomserver/storage/postgres/membership_table.go +++ b/roomserver/storage/postgres/membership_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -22,11 +14,11 @@ import ( "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/storage/postgres/previous_events_table.go b/roomserver/storage/postgres/previous_events_table.go index ceb5e26bab..c57c979c4a 100644 --- a/roomserver/storage/postgres/previous_events_table.go +++ b/roomserver/storage/postgres/previous_events_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const previousEventSchema = ` diff --git a/roomserver/storage/postgres/published_table.go b/roomserver/storage/postgres/published_table.go index eca81d81f7..91d309eccd 100644 --- a/roomserver/storage/postgres/published_table.go +++ b/roomserver/storage/postgres/published_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,10 +10,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" ) const publishedSchema = ` diff --git a/roomserver/storage/postgres/purge_statements.go b/roomserver/storage/postgres/purge_statements.go index 9ca8d03464..9f7f007555 100644 --- a/roomserver/storage/postgres/purge_statements.go +++ b/roomserver/storage/postgres/purge_statements.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,8 +10,8 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/types" ) const purgeEventJSONSQL = "" + diff --git a/roomserver/storage/postgres/redactions_table.go b/roomserver/storage/postgres/redactions_table.go index 6e2f6712da..4e99bda40b 100644 --- a/roomserver/storage/postgres/redactions_table.go +++ b/roomserver/storage/postgres/redactions_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,8 +10,8 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" ) const redactionsSchema = ` diff --git a/roomserver/storage/postgres/reported_events_table.go b/roomserver/storage/postgres/reported_events_table.go index c46f47b344..bf59767cc2 100644 --- a/roomserver/storage/postgres/reported_events_table.go +++ b/roomserver/storage/postgres/reported_events_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,11 +11,11 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/storage/postgres/room_aliases_table.go b/roomserver/storage/postgres/room_aliases_table.go index a84929f61a..5e97fe28a7 100644 --- a/roomserver/storage/postgres/room_aliases_table.go +++ b/roomserver/storage/postgres/room_aliases_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" ) const roomAliasesSchema = ` diff --git a/roomserver/storage/postgres/rooms_table.go b/roomserver/storage/postgres/rooms_table.go index 4de6dee46b..4e040b9a71 100644 --- a/roomserver/storage/postgres/rooms_table.go +++ b/roomserver/storage/postgres/rooms_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,11 +11,11 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/storage/postgres/state_block_table.go b/roomserver/storage/postgres/state_block_table.go index 5af48f031f..27b7281112 100644 --- a/roomserver/storage/postgres/state_block_table.go +++ b/roomserver/storage/postgres/state_block_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "database/sql" "fmt" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/util" ) diff --git a/roomserver/storage/postgres/state_snapshot_table.go b/roomserver/storage/postgres/state_snapshot_table.go index 32ed06a131..0fd1be9f19 100644 --- a/roomserver/storage/postgres/state_snapshot_table.go +++ b/roomserver/storage/postgres/state_snapshot_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -24,8 +16,8 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/types" ) const stateSnapshotSchema = ` @@ -79,8 +71,8 @@ const bulkSelectStateBlockNIDsSQL = "" + // TODO: There's a sequence scan here because of the hash join strategy, which is // probably O(n) on state key entries, so there must be a way to avoid that somehow. // Event type NIDs are: -// - 5: m.room.member as per https://github.com/matrix-org/dendrite/blob/c7f7aec4d07d59120d37d5b16a900f6d608a75c4/roomserver/storage/postgres/event_types_table.go#L40 -// - 7: m.room.history_visibility as per https://github.com/matrix-org/dendrite/blob/c7f7aec4d07d59120d37d5b16a900f6d608a75c4/roomserver/storage/postgres/event_types_table.go#L42 +// - 5: m.room.member as per https://github.com/element-hq/dendrite/blob/c7f7aec4d07d59120d37d5b16a900f6d608a75c4/roomserver/storage/postgres/event_types_table.go#L40 +// - 7: m.room.history_visibility as per https://github.com/element-hq/dendrite/blob/c7f7aec4d07d59120d37d5b16a900f6d608a75c4/roomserver/storage/postgres/event_types_table.go#L42 const bulkSelectStateForHistoryVisibilitySQL = ` SELECT event_nid FROM ( SELECT event_nid, event_type_nid, event_state_key_nid FROM roomserver_events diff --git a/roomserver/storage/postgres/storage.go b/roomserver/storage/postgres/storage.go index 1068230f75..9c9a5777f6 100644 --- a/roomserver/storage/postgres/storage.go +++ b/roomserver/storage/postgres/storage.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -24,11 +16,11 @@ import ( // Import the postgres database driver. _ "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres/deltas" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/setup/config" ) // A Database is used to store room events and stream offsets. diff --git a/roomserver/storage/postgres/user_room_keys_table.go b/roomserver/storage/postgres/user_room_keys_table.go index f8befc46b2..29f6f856bf 100644 --- a/roomserver/storage/postgres/user_room_keys_table.go +++ b/roomserver/storage/postgres/user_room_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "database/sql" "errors" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/storage/shared/membership_updater.go b/roomserver/storage/shared/membership_updater.go index a96e870721..62b72ca6cc 100644 --- a/roomserver/storage/shared/membership_updater.go +++ b/roomserver/storage/shared/membership_updater.go @@ -5,8 +5,8 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/storage/shared/prepare.go b/roomserver/storage/shared/prepare.go index 65ceec1cc4..c99ff0ce37 100644 --- a/roomserver/storage/shared/prepare.go +++ b/roomserver/storage/shared/prepare.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared diff --git a/roomserver/storage/shared/room_updater.go b/roomserver/storage/shared/room_updater.go index 06284d2e33..e580d9ab81 100644 --- a/roomserver/storage/shared/room_updater.go +++ b/roomserver/storage/shared/room_updater.go @@ -7,7 +7,7 @@ import ( "github.com/matrix-org/gomatrixserverlib" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" ) type RoomUpdater struct { diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go index 7b04641bf7..a4eb0eb9be 100644 --- a/roomserver/storage/shared/storage.go +++ b/roomserver/storage/shared/storage.go @@ -9,19 +9,19 @@ import ( "fmt" "sort" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/state" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/state" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) // Ideally, when we have both events we should redact the event JSON and forget about the redaction, but we currently diff --git a/roomserver/storage/shared/storage_test.go b/roomserver/storage/shared/storage_test.go index 612e4ef069..c55aa48b79 100644 --- a/roomserver/storage/shared/storage_test.go +++ b/roomserver/storage/shared/storage_test.go @@ -6,20 +6,20 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" ed255192 "golang.org/x/crypto/ed25519" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" ) func mustCreateRoomserverDatabase(t *testing.T, dbType test.DBType) (*shared.Database, func()) { diff --git a/roomserver/storage/sqlite3/deltas/20201028212440_add_forgotten_column.go b/roomserver/storage/sqlite3/deltas/20201028212440_add_forgotten_column.go index 4c002e33da..291313a5db 100644 --- a/roomserver/storage/sqlite3/deltas/20201028212440_add_forgotten_column.go +++ b/roomserver/storage/sqlite3/deltas/20201028212440_add_forgotten_column.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/roomserver/storage/sqlite3/deltas/2021041615092700_state_blocks_refactor.go b/roomserver/storage/sqlite3/deltas/2021041615092700_state_blocks_refactor.go index 00978121f5..4662e07e7d 100644 --- a/roomserver/storage/sqlite3/deltas/2021041615092700_state_blocks_refactor.go +++ b/roomserver/storage/sqlite3/deltas/2021041615092700_state_blocks_refactor.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas @@ -20,8 +12,8 @@ import ( "encoding/json" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/util" "github.com/sirupsen/logrus" ) diff --git a/roomserver/storage/sqlite3/deltas/20221027084407_published_appservice.go b/roomserver/storage/sqlite3/deltas/20221027084407_published_appservice.go index 410fb7cf62..6d1a2fb066 100644 --- a/roomserver/storage/sqlite3/deltas/20221027084407_published_appservice.go +++ b/roomserver/storage/sqlite3/deltas/20221027084407_published_appservice.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha.go b/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha.go index 515bccc374..da9f1c2219 100644 --- a/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha.go +++ b/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas @@ -19,8 +11,8 @@ import ( "database/sql" "fmt" + "github.com/element-hq/dendrite/internal" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/util" ) diff --git a/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha_test.go b/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha_test.go index 547d9703be..962757d266 100644 --- a/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha_test.go +++ b/roomserver/storage/sqlite3/deltas/20230516154000_drop_reference_sha_test.go @@ -3,9 +3,9 @@ package deltas import ( "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/sqlite3/event_json_table.go b/roomserver/storage/sqlite3/event_json_table.go index 325951c7fb..753f49e3b9 100644 --- a/roomserver/storage/sqlite3/event_json_table.go +++ b/roomserver/storage/sqlite3/event_json_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,10 +12,10 @@ import ( "database/sql" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const eventJSONSchema = ` diff --git a/roomserver/storage/sqlite3/event_state_keys_table.go b/roomserver/storage/sqlite3/event_state_keys_table.go index a052d69ed2..21fdb015cd 100644 --- a/roomserver/storage/sqlite3/event_state_keys_table.go +++ b/roomserver/storage/sqlite3/event_state_keys_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,10 +13,10 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const eventStateKeysSchema = ` diff --git a/roomserver/storage/sqlite3/event_types_table.go b/roomserver/storage/sqlite3/event_types_table.go index c030fffea7..db2e6d5a14 100644 --- a/roomserver/storage/sqlite3/event_types_table.go +++ b/roomserver/storage/sqlite3/event_types_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,10 +13,10 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const eventTypesSchema = ` diff --git a/roomserver/storage/sqlite3/events_table.go b/roomserver/storage/sqlite3/events_table.go index 26401e45d2..a3481f1e01 100644 --- a/roomserver/storage/sqlite3/events_table.go +++ b/roomserver/storage/sqlite3/events_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -24,11 +16,11 @@ import ( "sort" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const eventsSchema = ` diff --git a/roomserver/storage/sqlite3/invite_table.go b/roomserver/storage/sqlite3/invite_table.go index b678d8add9..b2857df8a8 100644 --- a/roomserver/storage/sqlite3/invite_table.go +++ b/roomserver/storage/sqlite3/invite_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,10 +11,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) const inviteSchema = ` diff --git a/roomserver/storage/sqlite3/membership_table.go b/roomserver/storage/sqlite3/membership_table.go index 1012c074a7..3eae147474 100644 --- a/roomserver/storage/sqlite3/membership_table.go +++ b/roomserver/storage/sqlite3/membership_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,11 +13,11 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/storage/sqlite3/previous_events_table.go b/roomserver/storage/sqlite3/previous_events_table.go index 4e59fbba7d..3698f71b63 100644 --- a/roomserver/storage/sqlite3/previous_events_table.go +++ b/roomserver/storage/sqlite3/previous_events_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -22,10 +14,10 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" ) // TODO: previous_reference_sha256 was NOT NULL before but it broke sytest because diff --git a/roomserver/storage/sqlite3/published_table.go b/roomserver/storage/sqlite3/published_table.go index 34666552e2..3711b6e322 100644 --- a/roomserver/storage/sqlite3/published_table.go +++ b/roomserver/storage/sqlite3/published_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,10 +10,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/roomserver/storage/tables" ) const publishedSchema = ` diff --git a/roomserver/storage/sqlite3/purge_statements.go b/roomserver/storage/sqlite3/purge_statements.go index cb21515b85..862f9aa931 100644 --- a/roomserver/storage/sqlite3/purge_statements.go +++ b/roomserver/storage/sqlite3/purge_statements.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,8 +10,8 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/types" ) const purgeEventJSONSQL = "" + diff --git a/roomserver/storage/sqlite3/redactions_table.go b/roomserver/storage/sqlite3/redactions_table.go index db6f57a1b5..902babc077 100644 --- a/roomserver/storage/sqlite3/redactions_table.go +++ b/roomserver/storage/sqlite3/redactions_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,8 +10,8 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" ) const redactionsSchema = ` diff --git a/roomserver/storage/sqlite3/reported_events_table.go b/roomserver/storage/sqlite3/reported_events_table.go index b72cb06851..215704d2c7 100644 --- a/roomserver/storage/sqlite3/reported_events_table.go +++ b/roomserver/storage/sqlite3/reported_events_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,11 +11,11 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/storage/sqlite3/room_aliases_table.go b/roomserver/storage/sqlite3/room_aliases_table.go index 815b42a279..3aa419ea70 100644 --- a/roomserver/storage/sqlite3/room_aliases_table.go +++ b/roomserver/storage/sqlite3/room_aliases_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,9 +11,9 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" ) const roomAliasesSchema = ` diff --git a/roomserver/storage/sqlite3/rooms_table.go b/roomserver/storage/sqlite3/rooms_table.go index 5034b24250..93a9bb8f34 100644 --- a/roomserver/storage/sqlite3/rooms_table.go +++ b/roomserver/storage/sqlite3/rooms_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -22,10 +14,10 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/storage/sqlite3/state_block_table.go b/roomserver/storage/sqlite3/state_block_table.go index ae8181cfa2..bbe2fc3fd2 100644 --- a/roomserver/storage/sqlite3/state_block_table.go +++ b/roomserver/storage/sqlite3/state_block_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -22,9 +14,9 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/util" ) diff --git a/roomserver/storage/sqlite3/state_snapshot_table.go b/roomserver/storage/sqlite3/state_snapshot_table.go index dcac0b07c4..13dcc55cf6 100644 --- a/roomserver/storage/sqlite3/state_snapshot_table.go +++ b/roomserver/storage/sqlite3/state_snapshot_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -22,10 +14,10 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/util" ) diff --git a/roomserver/storage/sqlite3/storage.go b/roomserver/storage/sqlite3/storage.go index 191c072232..144f2ac0f7 100644 --- a/roomserver/storage/sqlite3/storage.go +++ b/roomserver/storage/sqlite3/storage.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,12 +13,12 @@ import ( "errors" "fmt" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/shared" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/shared" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/storage/sqlite3/user_room_keys_table.go b/roomserver/storage/sqlite3/user_room_keys_table.go index ef3b8fe202..7b38491dec 100644 --- a/roomserver/storage/sqlite3/user_room_keys_table.go +++ b/roomserver/storage/sqlite3/user_room_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,10 +13,10 @@ import ( "errors" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/roomserver/storage/storage.go b/roomserver/storage/storage.go index c3689f513a..8cdf927937 100644 --- a/roomserver/storage/storage.go +++ b/roomserver/storage/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm @@ -21,11 +13,11 @@ import ( "context" "fmt" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/setup/config" ) // Open opens a database connection. diff --git a/roomserver/storage/storage_wasm.go b/roomserver/storage/storage_wasm.go index 817f9304c7..e8f4991b85 100644 --- a/roomserver/storage/storage_wasm.go +++ b/roomserver/storage/storage_wasm.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -18,10 +10,10 @@ import ( "context" "fmt" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/setup/config" ) // NewPublicRoomsServerDatabase opens a database connection. diff --git a/roomserver/storage/tables/event_json_table_test.go b/roomserver/storage/tables/event_json_table_test.go index b490d0fe83..610299f716 100644 --- a/roomserver/storage/tables/event_json_table_test.go +++ b/roomserver/storage/tables/event_json_table_test.go @@ -5,13 +5,13 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/event_state_keys_table_test.go b/roomserver/storage/tables/event_state_keys_table_test.go index a856fe551e..58e41ff411 100644 --- a/roomserver/storage/tables/event_state_keys_table_test.go +++ b/roomserver/storage/tables/event_state_keys_table_test.go @@ -5,13 +5,13 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/event_types_table_test.go b/roomserver/storage/tables/event_types_table_test.go index 92c57a9176..c1a97c9f4c 100644 --- a/roomserver/storage/tables/event_types_table_test.go +++ b/roomserver/storage/tables/event_types_table_test.go @@ -5,13 +5,13 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/events_table_test.go b/roomserver/storage/tables/events_table_test.go index 52aeacc2f1..a9e61c8e2d 100644 --- a/roomserver/storage/tables/events_table_test.go +++ b/roomserver/storage/tables/events_table_test.go @@ -5,13 +5,13 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/interface.go b/roomserver/storage/tables/interface.go index 02f6992c4f..0c311c1e65 100644 --- a/roomserver/storage/tables/interface.go +++ b/roomserver/storage/tables/interface.go @@ -6,12 +6,12 @@ import ( "database/sql" "errors" - "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" ) var OptimisationNotSupportedError = errors.New("optimisation not supported") diff --git a/roomserver/storage/tables/interface_test.go b/roomserver/storage/tables/interface_test.go index 8727e24363..20707c5d7d 100644 --- a/roomserver/storage/tables/interface_test.go +++ b/roomserver/storage/tables/interface_test.go @@ -3,8 +3,8 @@ package tables import ( "testing" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/invite_table_test.go b/roomserver/storage/tables/invite_table_test.go index e3eedbf14d..8bec1fcc11 100644 --- a/roomserver/storage/tables/invite_table_test.go +++ b/roomserver/storage/tables/invite_table_test.go @@ -7,13 +7,13 @@ import ( "github.com/matrix-org/util" "github.com/stretchr/testify/assert" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" ) func mustCreateInviteTable(t *testing.T, dbType test.DBType) (tables.Invites, func()) { diff --git a/roomserver/storage/tables/membership_table_test.go b/roomserver/storage/tables/membership_table_test.go index c4524ee449..8d78540207 100644 --- a/roomserver/storage/tables/membership_table_test.go +++ b/roomserver/storage/tables/membership_table_test.go @@ -5,13 +5,13 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/previous_events_table_test.go b/roomserver/storage/tables/previous_events_table_test.go index 9d41e90be5..6a70f1a628 100644 --- a/roomserver/storage/tables/previous_events_table_test.go +++ b/roomserver/storage/tables/previous_events_table_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/util" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/published_table_test.go b/roomserver/storage/tables/published_table_test.go index e6289e9b10..5615f3715a 100644 --- a/roomserver/storage/tables/published_table_test.go +++ b/roomserver/storage/tables/published_table_test.go @@ -8,12 +8,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" ) func mustCreatePublishedTable(t *testing.T, dbType test.DBType) (tab tables.Published, close func()) { diff --git a/roomserver/storage/tables/redactions_table_test.go b/roomserver/storage/tables/redactions_table_test.go index ea48dc22f6..ce35de6695 100644 --- a/roomserver/storage/tables/redactions_table_test.go +++ b/roomserver/storage/tables/redactions_table_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/util" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/room_aliases_table_test.go b/roomserver/storage/tables/room_aliases_table_test.go index 624d92ae66..6ca778d4c0 100644 --- a/roomserver/storage/tables/room_aliases_table_test.go +++ b/roomserver/storage/tables/room_aliases_table_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/rooms_table_test.go b/roomserver/storage/tables/rooms_table_test.go index e97e3e3392..9db915cd88 100644 --- a/roomserver/storage/tables/rooms_table_test.go +++ b/roomserver/storage/tables/rooms_table_test.go @@ -4,13 +4,13 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/util" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/state_block_table_test.go b/roomserver/storage/tables/state_block_table_test.go index de0b420bc9..241cda439d 100644 --- a/roomserver/storage/tables/state_block_table_test.go +++ b/roomserver/storage/tables/state_block_table_test.go @@ -4,13 +4,13 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/state_snapshot_table_test.go b/roomserver/storage/tables/state_snapshot_table_test.go index c7c991b200..7d84c1b4b9 100644 --- a/roomserver/storage/tables/state_snapshot_table_test.go +++ b/roomserver/storage/tables/state_snapshot_table_test.go @@ -4,13 +4,13 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/roomserver/storage/tables/user_room_keys_table_test.go b/roomserver/storage/tables/user_room_keys_table_test.go index 2809771b4c..bb0ba2713e 100644 --- a/roomserver/storage/tables/user_room_keys_table_test.go +++ b/roomserver/storage/tables/user_room_keys_table_test.go @@ -6,13 +6,13 @@ import ( "database/sql" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/storage/postgres" - "github.com/matrix-org/dendrite/roomserver/storage/sqlite3" - "github.com/matrix-org/dendrite/roomserver/storage/tables" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/storage/postgres" + "github.com/element-hq/dendrite/roomserver/storage/sqlite3" + "github.com/element-hq/dendrite/roomserver/storage/tables" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" ed255192 "golang.org/x/crypto/ed25519" diff --git a/roomserver/types/headered_event.go b/roomserver/types/headered_event.go index 7839998222..89825171d5 100644 --- a/roomserver/types/headered_event.go +++ b/roomserver/types/headered_event.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package types diff --git a/roomserver/types/types.go b/roomserver/types/types.go index fbff2cdab1..759066bc0b 100644 --- a/roomserver/types/types.go +++ b/roomserver/types/types.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package types provides the types that are used internally within the roomserver. package types @@ -22,7 +14,7 @@ import ( "strings" "sync" - userapi "github.com/matrix-org/dendrite/userapi/api" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/roomserver/version/version.go b/roomserver/version/version.go index e8bd890a0b..5d7b72150e 100644 --- a/roomserver/version/version.go +++ b/roomserver/version/version.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package version diff --git a/setup/base/base.go b/setup/base/base.go index 26615fc084..359a6816b1 100644 --- a/setup/base/base.go +++ b/setup/base/base.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package base @@ -36,15 +28,15 @@ import ( "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/prometheus/client_golang/prometheus/promhttp" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/httputil" "github.com/gorilla/mux" "github.com/kardianos/minwinsvc" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/httputil" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" ) //go:embed static/*.gotmpl diff --git a/setup/base/base_test.go b/setup/base/base_test.go index bba967b941..72f8b239e4 100644 --- a/setup/base/base_test.go +++ b/setup/base/base_test.go @@ -12,11 +12,11 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/httputil" - basepkg "github.com/matrix-org/dendrite/setup/base" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/httputil" + basepkg "github.com/element-hq/dendrite/setup/base" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" "github.com/stretchr/testify/assert" ) diff --git a/setup/config/config.go b/setup/config/config.go index 41396ae361..2ed30a423f 100644 --- a/setup/config/config.go +++ b/setup/config/config.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package config @@ -24,7 +16,7 @@ import ( "regexp" "strings" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" diff --git a/setup/config/config_appservice.go b/setup/config/config_appservice.go index a95cec0462..0385fb1247 100644 --- a/setup/config/config_appservice.go +++ b/setup/config/config_appservice.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Andrew Morgan // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package config diff --git a/setup/config/config_mediaapi.go b/setup/config/config_mediaapi.go index 030bc37541..c9538e2eff 100644 --- a/setup/config/config_mediaapi.go +++ b/setup/config/config_mediaapi.go @@ -30,6 +30,17 @@ type MediaAPI struct { // A list of thumbnail sizes to be pre-generated for downloaded remote / uploaded content ThumbnailSizes []ThumbnailSize `yaml:"thumbnail_sizes"` + + // Black list of urls + UrlPreviewBlacklist []string `yaml:"url_preview_blacklist"` + + // The time in seconds to cache URL previews for + UrlPreviewCacheTime int `yaml:"url_preview_cache_time"` + + // The timeout in milliseconds for fetching URL previews + UrlPreviewTimeout int `yaml:"url_preview_timeout"` + + UrlPreviewThumbnailSize ThumbnailSize `yaml:"url_preview_thumbnail_size"` } // DefaultMaxFileSizeBytes defines the default file size allowed in transfers @@ -38,6 +49,9 @@ var DefaultMaxFileSizeBytes = FileSizeBytes(10485760) func (c *MediaAPI) Defaults(opts DefaultOpts) { c.MaxFileSizeBytes = DefaultMaxFileSizeBytes c.MaxThumbnailGenerators = 10 + c.UrlPreviewCacheTime = 10 + c.UrlPreviewTimeout = 10000 + if opts.Generate { c.ThumbnailSizes = []ThumbnailSize{ { @@ -76,4 +90,11 @@ func (c *MediaAPI) Verify(configErrs *ConfigErrors) { if c.Matrix.DatabaseOptions.ConnectionString == "" { checkNotEmpty(configErrs, "media_api.database.connection_string", string(c.Database.ConnectionString)) } + + // If MaxFileSizeBytes overflows int64, default to DefaultMaxFileSizeBytes + if c.MaxFileSizeBytes+1 <= 0 { + c.MaxFileSizeBytes = DefaultMaxFileSizeBytes + fmt.Printf("Configured MediaApi.MaxFileSizeBytes overflows int64, defaulting to %d bytes", DefaultMaxFileSizeBytes) + } + } diff --git a/setup/config/config_relayapi.go b/setup/config/config_relayapi.go index ba7b78082d..0ac36847b3 100644 --- a/setup/config/config_relayapi.go +++ b/setup/config/config_relayapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package config diff --git a/setup/config/config_test.go b/setup/config/config_test.go index eeefb425f5..2d51e4e15d 100644 --- a/setup/config/config_test.go +++ b/setup/config/config_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package config @@ -322,3 +314,18 @@ func Test_SigningIdentityFor(t *testing.T) { }) } } + +func Test_MediaAPIConfigVerify(t *testing.T) { + config := &MediaAPI{ + Matrix: &Global{DatabaseOptions: DatabaseOptions{}}, + Database: DatabaseOptions{}, + MaxFileSizeBytes: FileSizeBytes(^int64(0)), + } + + configErrs := &ConfigErrors{} + + config.Verify(configErrs) + if config.MaxFileSizeBytes != DefaultMaxFileSizeBytes { + t.Errorf("config.MediaAPI.MaxFileSizeBytes got = %v, want %v", config.MaxFileSizeBytes, DefaultMaxFileSizeBytes) + } +} diff --git a/setup/flags.go b/setup/flags.go index 869caa280b..b8c202244d 100644 --- a/setup/flags.go +++ b/setup/flags.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package setup @@ -19,8 +11,8 @@ import ( "fmt" "os" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/setup/config" "github.com/sirupsen/logrus" ) diff --git a/setup/jetstream/nats.go b/setup/jetstream/nats.go index 09048cc940..cc896f8eed 100644 --- a/setup/jetstream/nats.go +++ b/setup/jetstream/nats.go @@ -11,8 +11,8 @@ import ( "github.com/getsentry/sentry-go" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" natsserver "github.com/nats-io/nats-server/v2/server" natsclient "github.com/nats-io/nats.go" diff --git a/setup/monolith.go b/setup/monolith.go index 72750354b4..36d6794d69 100644 --- a/setup/monolith.go +++ b/setup/monolith.go @@ -1,38 +1,30 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package setup import ( - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi" - "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/federationapi" - federationAPI "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/internal/transactions" - "github.com/matrix-org/dendrite/mediaapi" - "github.com/matrix-org/dendrite/relayapi" - relayAPI "github.com/matrix-org/dendrite/relayapi/api" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi" - userapi "github.com/matrix-org/dendrite/userapi/api" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi" + "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/federationapi" + federationAPI "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/transactions" + "github.com/element-hq/dendrite/mediaapi" + "github.com/element-hq/dendrite/relayapi" + relayAPI "github.com/element-hq/dendrite/relayapi/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" ) diff --git a/setup/mscs/msc2836/msc2836.go b/setup/mscs/msc2836/msc2836.go index 15811710d7..4322e8a2bb 100644 --- a/setup/mscs/msc2836/msc2836.go +++ b/setup/mscs/msc2836/msc2836.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package msc2836 'Threading' implements https://github.com/matrix-org/matrix-doc/pull/2836 package msc2836 @@ -27,15 +19,15 @@ import ( "strings" "time" - fs "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/hooks" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - roomserver "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/synctypes" - userapi "github.com/matrix-org/dendrite/userapi/api" + fs "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/hooks" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + roomserver "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/synctypes" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/setup/mscs/msc2836/msc2836_test.go b/setup/mscs/msc2836/msc2836_test.go index ecbab706f1..5b85e6707a 100644 --- a/setup/mscs/msc2836/msc2836_test.go +++ b/setup/mscs/msc2836/msc2836_test.go @@ -14,20 +14,20 @@ import ( "testing" "time" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/synctypes" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/synctypes" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal/hooks" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - roomserver "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/mscs/msc2836" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/hooks" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + roomserver "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/mscs/msc2836" + userapi "github.com/element-hq/dendrite/userapi/api" ) var ( diff --git a/setup/mscs/msc2836/storage.go b/setup/mscs/msc2836/storage.go index 696d0b0dad..3fef792793 100644 --- a/setup/mscs/msc2836/storage.go +++ b/setup/mscs/msc2836/storage.go @@ -7,9 +7,9 @@ import ( "encoding/base64" "encoding/json" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/setup/mscs/mscs.go b/setup/mscs/mscs.go index 7a942cf7c8..fc360b5d87 100644 --- a/setup/mscs/mscs.go +++ b/setup/mscs/mscs.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. // Package mscs implements Matrix Spec Changes from https://github.com/matrix-org/matrix-doc package mscs @@ -18,12 +10,12 @@ package mscs import ( "context" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/mscs/msc2836" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/mscs/msc2836" "github.com/matrix-org/util" "github.com/sirupsen/logrus" ) diff --git a/syncapi/consumers/clientapi.go b/syncapi/consumers/clientapi.go index 76b447133b..e6f966b2e1 100644 --- a/syncapi/consumers/clientapi.go +++ b/syncapi/consumers/clientapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -27,15 +19,15 @@ import ( log "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/fulltext" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/fulltext" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" ) // OutputClientDataConsumer consumes events that originated in the client API server. diff --git a/syncapi/consumers/keychange.go b/syncapi/consumers/keychange.go index 5faaefb8e7..39f2130609 100644 --- a/syncapi/consumers/keychange.go +++ b/syncapi/consumers/keychange.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -18,16 +10,16 @@ import ( "context" "encoding/json" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/userapi/api" "github.com/getsentry/sentry-go" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/userapi/api" "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" ) diff --git a/syncapi/consumers/presence.go b/syncapi/consumers/presence.go index c7c0866ba9..a13919ac5c 100644 --- a/syncapi/consumers/presence.go +++ b/syncapi/consumers/presence.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -18,14 +10,14 @@ import ( "context" "strconv" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" diff --git a/syncapi/consumers/receipts.go b/syncapi/consumers/receipts.go index 69571f90cf..6278ddab5a 100644 --- a/syncapi/consumers/receipts.go +++ b/syncapi/consumers/receipts.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -22,13 +14,13 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/consumers/roomserver.go b/syncapi/consumers/roomserver.go index abf8888299..75afa1c96a 100644 --- a/syncapi/consumers/roomserver.go +++ b/syncapi/consumers/roomserver.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -22,20 +14,20 @@ import ( "errors" "fmt" + "github.com/element-hq/dendrite/internal/fulltext" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/producers" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/getsentry/sentry-go" - "github.com/matrix-org/dendrite/internal/fulltext" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/producers" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" diff --git a/syncapi/consumers/sendtodevice.go b/syncapi/consumers/sendtodevice.go index 7f387dc09d..98f57d2287 100644 --- a/syncapi/consumers/sendtodevice.go +++ b/syncapi/consumers/sendtodevice.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -26,14 +18,14 @@ import ( log "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/userapi/api" ) // OutputSendToDeviceEventConsumer consumes events that originated in the EDU server. diff --git a/syncapi/consumers/typing.go b/syncapi/consumers/typing.go index 67a26239d1..8940cd1176 100644 --- a/syncapi/consumers/typing.go +++ b/syncapi/consumers/typing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2019 Alex Chen // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -19,13 +11,13 @@ import ( "strconv" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" ) diff --git a/syncapi/consumers/userapi.go b/syncapi/consumers/userapi.go index 3c73dc1fcb..89657be6ed 100644 --- a/syncapi/consumers/userapi.go +++ b/syncapi/consumers/userapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -22,14 +14,14 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" ) // OutputNotificationDataConsumer consumes events that originated in diff --git a/syncapi/internal/history_visibility.go b/syncapi/internal/history_visibility.go index 48475327de..d1d00b171f 100644 --- a/syncapi/internal/history_visibility.go +++ b/syncapi/internal/history_visibility.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -26,9 +18,9 @@ import ( "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage" ) func init() { diff --git a/syncapi/internal/history_visibility_test.go b/syncapi/internal/history_visibility_test.go index 24515bbb2d..4046edc093 100644 --- a/syncapi/internal/history_visibility_test.go +++ b/syncapi/internal/history_visibility_test.go @@ -6,9 +6,9 @@ import ( "math" "testing" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "gotest.tools/v3/assert" diff --git a/syncapi/internal/keychange.go b/syncapi/internal/keychange.go index 24ffcc0414..4e98188ee5 100644 --- a/syncapi/internal/keychange.go +++ b/syncapi/internal/keychange.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -18,18 +10,18 @@ import ( "context" "strings" - keytypes "github.com/matrix-org/dendrite/userapi/types" + keytypes "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/userapi/api" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/userapi/api" ) // DeviceOTKCounts adds one-time key counts to the /sync response diff --git a/syncapi/internal/keychange_test.go b/syncapi/internal/keychange_test.go index 56954cfa03..5ffa7f3f9b 100644 --- a/syncapi/internal/keychange_test.go +++ b/syncapi/internal/keychange_test.go @@ -10,10 +10,10 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) var ( diff --git a/syncapi/notifier/notifier.go b/syncapi/notifier/notifier.go index 07b80b1650..4c8fefd62e 100644 --- a/syncapi/notifier/notifier.go +++ b/syncapi/notifier/notifier.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package notifier @@ -19,11 +11,11 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" log "github.com/sirupsen/logrus" ) diff --git a/syncapi/notifier/notifier_test.go b/syncapi/notifier/notifier_test.go index f86301a060..87bafdc4de 100644 --- a/syncapi/notifier/notifier_test.go +++ b/syncapi/notifier/notifier_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package notifier @@ -22,10 +14,10 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) diff --git a/syncapi/notifier/userstream.go b/syncapi/notifier/userstream.go index bcd69fad56..af88a8ddf6 100644 --- a/syncapi/notifier/userstream.go +++ b/syncapi/notifier/userstream.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package notifier @@ -20,7 +12,7 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/syncapi/types" ) // UserDeviceStream represents a communication mechanism between the /sync request goroutine diff --git a/syncapi/producers/appservices.go b/syncapi/producers/appservices.go index bb0dbb9cff..af304542ca 100644 --- a/syncapi/producers/appservices.go +++ b/syncapi/producers/appservices.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package producers diff --git a/syncapi/producers/federationapi_presence.go b/syncapi/producers/federationapi_presence.go index eab1b0b25e..cf7efe206e 100644 --- a/syncapi/producers/federationapi_presence.go +++ b/syncapi/producers/federationapi_presence.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package producers @@ -18,8 +10,8 @@ import ( "strconv" "time" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" ) diff --git a/syncapi/routing/context.go b/syncapi/routing/context.go index b136c69a0a..3f5d6e3b11 100644 --- a/syncapi/routing/context.go +++ b/syncapi/routing/context.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -23,15 +15,15 @@ import ( "strconv" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - roomserver "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/internal" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + roomserver "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/internal" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/syncapi/routing/context_test.go b/syncapi/routing/context_test.go index 5c6682bd13..79ec5ce3c3 100644 --- a/syncapi/routing/context_test.go +++ b/syncapi/routing/context_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/synctypes" ) func Test_parseContextParams(t *testing.T) { diff --git a/syncapi/routing/filter.go b/syncapi/routing/filter.go index c4eecbdb8a..469127d510 100644 --- a/syncapi/routing/filter.go +++ b/syncapi/routing/filter.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Jan Christian Grünhage // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -23,10 +15,10 @@ import ( "github.com/matrix-org/util" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/sync" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/sync" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/routing/getevent.go b/syncapi/routing/getevent.go index d0227f4ea1..eaa7cab2fe 100644 --- a/syncapi/routing/getevent.go +++ b/syncapi/routing/getevent.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -20,12 +12,12 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/internal" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/internal" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/routing/memberships.go b/syncapi/routing/memberships.go index 9cc937d88d..9ce0a2eee7 100644 --- a/syncapi/routing/memberships.go +++ b/syncapi/routing/memberships.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -18,11 +10,11 @@ import ( "math" "net/http" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" diff --git a/syncapi/routing/messages.go b/syncapi/routing/messages.go index 7ea01c7dc1..8d1434abc5 100644 --- a/syncapi/routing/messages.go +++ b/syncapi/routing/messages.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -27,17 +18,17 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/internal" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/sync" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/internal" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/sync" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) type messagesReq struct { diff --git a/syncapi/routing/relations.go b/syncapi/routing/relations.go index 935ba83b30..81f1ef45fe 100644 --- a/syncapi/routing/relations.go +++ b/syncapi/routing/relations.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,14 +13,14 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/internal" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/internal" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/routing/routing.go b/syncapi/routing/routing.go index 78188d1b6c..dcc78c859a 100644 --- a/syncapi/routing/routing.go +++ b/syncapi/routing/routing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -21,14 +13,14 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/fulltext" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/sync" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/fulltext" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/sync" + userapi "github.com/element-hq/dendrite/userapi/api" ) // Setup configures the given mux with sync-server listeners diff --git a/syncapi/routing/search.go b/syncapi/routing/search.go index 4a8be9f495..3024e44a47 100644 --- a/syncapi/routing/search.go +++ b/syncapi/routing/search.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package routing @@ -28,14 +20,14 @@ import ( "github.com/sirupsen/logrus" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/internal/fulltext" - "github.com/matrix-org/dendrite/internal/sqlutil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/clientapi/httputil" + "github.com/element-hq/dendrite/internal/fulltext" + "github.com/element-hq/dendrite/internal/sqlutil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/userapi/api" ) // nolint:gocyclo diff --git a/syncapi/routing/search_test.go b/syncapi/routing/search_test.go index a983bb7b5b..faf88c8679 100644 --- a/syncapi/routing/search_test.go +++ b/syncapi/routing/search_test.go @@ -8,16 +8,16 @@ import ( "net/http/httptest" "testing" - "github.com/matrix-org/dendrite/internal/fulltext" - "github.com/matrix-org/dendrite/internal/sqlutil" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/fulltext" + "github.com/element-hq/dendrite/internal/sqlutil" + rsapi "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/syncapi/storage/interface.go b/syncapi/storage/interface.go index 97c781b9b1..fec71eaa08 100644 --- a/syncapi/storage/interface.go +++ b/syncapi/storage/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -20,14 +12,14 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/shared" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/shared" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) type DatabaseTransaction interface { diff --git a/syncapi/storage/postgres/account_data_table.go b/syncapi/storage/postgres/account_data_table.go index 44d735bb4f..e4b558fff3 100644 --- a/syncapi/storage/postgres/account_data_table.go +++ b/syncapi/storage/postgres/account_data_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,12 +11,12 @@ import ( "context" "database/sql" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" ) const accountDataSchema = ` diff --git a/syncapi/storage/postgres/backwards_extremities_table.go b/syncapi/storage/postgres/backwards_extremities_table.go index c20d860a70..cad5b1d19d 100644 --- a/syncapi/storage/postgres/backwards_extremities_table.go +++ b/syncapi/storage/postgres/backwards_extremities_table.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,9 +9,9 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" ) const backwardExtremitiesSchema = ` diff --git a/syncapi/storage/postgres/current_room_state_table.go b/syncapi/storage/postgres/current_room_state_table.go index ec0b27adce..2e75fefb80 100644 --- a/syncapi/storage/postgres/current_room_state_table.go +++ b/syncapi/storage/postgres/current_room_state_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -21,14 +13,14 @@ import ( "encoding/json" "errors" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/storage/postgres/deltas/20201211125500_sequences.go b/syncapi/storage/postgres/deltas/20201211125500_sequences.go index 6303c94725..f216cacd89 100644 --- a/syncapi/storage/postgres/deltas/20201211125500_sequences.go +++ b/syncapi/storage/postgres/deltas/20201211125500_sequences.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/syncapi/storage/postgres/deltas/20210112130000_sendtodevice_sentcolumn.go b/syncapi/storage/postgres/deltas/20210112130000_sendtodevice_sentcolumn.go index 77b083ae2c..ea25c70036 100644 --- a/syncapi/storage/postgres/deltas/20210112130000_sendtodevice_sentcolumn.go +++ b/syncapi/storage/postgres/deltas/20210112130000_sendtodevice_sentcolumn.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/syncapi/storage/postgres/deltas/2022061412000000_history_visibility_column.go b/syncapi/storage/postgres/deltas/2022061412000000_history_visibility_column.go index 37660ee9d6..28fb683243 100644 --- a/syncapi/storage/postgres/deltas/2022061412000000_history_visibility_column.go +++ b/syncapi/storage/postgres/deltas/2022061412000000_history_visibility_column.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas @@ -20,7 +12,7 @@ import ( "encoding/json" "fmt" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/syncapi/storage/postgres/deltas/20230201152200_rename_index.go b/syncapi/storage/postgres/deltas/20230201152200_rename_index.go index 5a0ec5050f..8054625043 100644 --- a/syncapi/storage/postgres/deltas/20230201152200_rename_index.go +++ b/syncapi/storage/postgres/deltas/20230201152200_rename_index.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2023 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/syncapi/storage/postgres/filter_table.go b/syncapi/storage/postgres/filter_table.go index 089382b890..34233f348c 100644 --- a/syncapi/storage/postgres/filter_table.go +++ b/syncapi/storage/postgres/filter_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Jan Christian Grünhage // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/syncapi/storage/postgres/filtering.go b/syncapi/storage/postgres/filtering.go index 39ef11086d..0d9271332f 100644 --- a/syncapi/storage/postgres/filtering.go +++ b/syncapi/storage/postgres/filtering.go @@ -1,23 +1,15 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Thibaut CHARLES // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres import ( "strings" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/synctypes" ) // filterConvertWildcardToSQL converts wildcards as defined in diff --git a/syncapi/storage/postgres/ignores_table.go b/syncapi/storage/postgres/ignores_table.go index a511c747cc..878f9be87f 100644 --- a/syncapi/storage/postgres/ignores_table.go +++ b/syncapi/storage/postgres/ignores_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const ignoresSchema = ` diff --git a/syncapi/storage/postgres/invites_table.go b/syncapi/storage/postgres/invites_table.go index 1f46cd09db..db364f4cb3 100644 --- a/syncapi/storage/postgres/invites_table.go +++ b/syncapi/storage/postgres/invites_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const inviteEventsSchema = ` diff --git a/syncapi/storage/postgres/memberships_table.go b/syncapi/storage/postgres/memberships_table.go index e5208b8919..e16a230d4c 100644 --- a/syncapi/storage/postgres/memberships_table.go +++ b/syncapi/storage/postgres/memberships_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,11 +11,11 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) // The memberships table is designed to track the last time that diff --git a/syncapi/storage/postgres/notification_data_table.go b/syncapi/storage/postgres/notification_data_table.go index 7edfd54a61..738c042041 100644 --- a/syncapi/storage/postgres/notification_data_table.go +++ b/syncapi/storage/postgres/notification_data_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) func NewPostgresNotificationDataTable(db *sql.DB) (tables.NotificationData, error) { diff --git a/syncapi/storage/postgres/output_room_events_table.go b/syncapi/storage/postgres/output_room_events_table.go index b2d1911113..1ca426f602 100644 --- a/syncapi/storage/postgres/output_room_events_table.go +++ b/syncapi/storage/postgres/output_room_events_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -22,15 +14,15 @@ import ( "fmt" "sort" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/syncapi/storage/postgres/output_room_events_topology_table.go b/syncapi/storage/postgres/output_room_events_topology_table.go index 2158d99ecb..c6537f75e3 100644 --- a/syncapi/storage/postgres/output_room_events_topology_table.go +++ b/syncapi/storage/postgres/output_room_events_topology_table.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,11 +9,11 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const outputRoomEventsTopologySchema = ` diff --git a/syncapi/storage/postgres/peeks_table.go b/syncapi/storage/postgres/peeks_table.go index 1120dce0b3..fb3ff37e19 100644 --- a/syncapi/storage/postgres/peeks_table.go +++ b/syncapi/storage/postgres/peeks_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const peeksSchema = ` diff --git a/syncapi/storage/postgres/presence_table.go b/syncapi/storage/postgres/presence_table.go index 53acecce52..f53a249d37 100644 --- a/syncapi/storage/postgres/presence_table.go +++ b/syncapi/storage/postgres/presence_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -22,10 +14,10 @@ import ( "github.com/lib/pq" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" ) const presenceSchema = ` diff --git a/syncapi/storage/postgres/receipt_table.go b/syncapi/storage/postgres/receipt_table.go index 9ab8eece0d..b5693c016e 100644 --- a/syncapi/storage/postgres/receipt_table.go +++ b/syncapi/storage/postgres/receipt_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -21,11 +13,11 @@ import ( "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/storage/postgres/relations_table.go b/syncapi/storage/postgres/relations_table.go index 5a76e9c336..c0bfd09a6d 100644 --- a/syncapi/storage/postgres/relations_table.go +++ b/syncapi/storage/postgres/relations_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,10 +10,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const relationsSchema = ` diff --git a/syncapi/storage/postgres/send_to_device_table.go b/syncapi/storage/postgres/send_to_device_table.go index 88b86ef7b4..3f63189a7b 100644 --- a/syncapi/storage/postgres/send_to_device_table.go +++ b/syncapi/storage/postgres/send_to_device_table.go @@ -1,16 +1,8 @@ -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,11 +11,11 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" "github.com/sirupsen/logrus" ) diff --git a/syncapi/storage/postgres/syncserver.go b/syncapi/storage/postgres/syncserver.go index 2105bcae25..321b55b7f9 100644 --- a/syncapi/storage/postgres/syncserver.go +++ b/syncapi/storage/postgres/syncserver.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "database/sql" // Import the postgres database driver. + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/syncapi/storage/shared" _ "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/shared" ) // SyncServerDatasource represents a sync server datasource which manages diff --git a/syncapi/storage/shared/storage_consumer.go b/syncapi/storage/shared/storage_consumer.go index 923ead9bdd..050b0987db 100644 --- a/syncapi/storage/shared/storage_consumer.go +++ b/syncapi/storage/shared/storage_consumer.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared @@ -22,19 +14,19 @@ import ( "github.com/tidwall/gjson" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" ) // Database is a temporary struct until we have made syncserver.go the same for both pq/sqlite diff --git a/syncapi/storage/shared/storage_consumer_test.go b/syncapi/storage/shared/storage_consumer_test.go index e5f734c96e..486515f969 100644 --- a/syncapi/storage/shared/storage_consumer_test.go +++ b/syncapi/storage/shared/storage_consumer_test.go @@ -5,12 +5,12 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" ) func newSyncDB(t *testing.T, dbType test.DBType) (storage.Database, func()) { diff --git a/syncapi/storage/shared/storage_sync.go b/syncapi/storage/shared/storage_sync.go index cd17fdc699..23f84200c1 100644 --- a/syncapi/storage/shared/storage_sync.go +++ b/syncapi/storage/shared/storage_sync.go @@ -9,12 +9,12 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) type DatabaseTransaction struct { diff --git a/syncapi/storage/shared/storage_sync_test.go b/syncapi/storage/shared/storage_sync_test.go index 4468a7728c..0b402519c6 100644 --- a/syncapi/storage/shared/storage_sync_test.go +++ b/syncapi/storage/shared/storage_sync_test.go @@ -3,7 +3,7 @@ package shared import ( "testing" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/synctypes" ) func Test_isStatefilterEmpty(t *testing.T) { diff --git a/syncapi/storage/sqlite3/account_data_table.go b/syncapi/storage/sqlite3/account_data_table.go index 132bd80c8f..b98cf2278b 100644 --- a/syncapi/storage/sqlite3/account_data_table.go +++ b/syncapi/storage/sqlite3/account_data_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,11 +11,11 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" ) const accountDataSchema = ` diff --git a/syncapi/storage/sqlite3/backwards_extremities_table.go b/syncapi/storage/sqlite3/backwards_extremities_table.go index 2d8cf2ed29..2cdd63d869 100644 --- a/syncapi/storage/sqlite3/backwards_extremities_table.go +++ b/syncapi/storage/sqlite3/backwards_extremities_table.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,9 +9,9 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" ) const backwardExtremitiesSchema = ` diff --git a/syncapi/storage/sqlite3/current_room_state_table.go b/syncapi/storage/sqlite3/current_room_state_table.go index f430fcc052..32ae246591 100644 --- a/syncapi/storage/sqlite3/current_room_state_table.go +++ b/syncapi/storage/sqlite3/current_room_state_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -23,13 +15,13 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/storage/sqlite3/deltas/20201211125500_sequences.go b/syncapi/storage/sqlite3/deltas/20201211125500_sequences.go index f476335d59..cbf512df0f 100644 --- a/syncapi/storage/sqlite3/deltas/20201211125500_sequences.go +++ b/syncapi/storage/sqlite3/deltas/20201211125500_sequences.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/syncapi/storage/sqlite3/deltas/20210112130000_sendtodevice_sentcolumn.go b/syncapi/storage/sqlite3/deltas/20210112130000_sendtodevice_sentcolumn.go index 34cae22413..d9e2958fa9 100644 --- a/syncapi/storage/sqlite3/deltas/20210112130000_sendtodevice_sentcolumn.go +++ b/syncapi/storage/sqlite3/deltas/20210112130000_sendtodevice_sentcolumn.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/syncapi/storage/sqlite3/deltas/2022061412000000_history_visibility_column.go b/syncapi/storage/sqlite3/deltas/2022061412000000_history_visibility_column.go index f7ce6531ec..0cfa010fba 100644 --- a/syncapi/storage/sqlite3/deltas/2022061412000000_history_visibility_column.go +++ b/syncapi/storage/sqlite3/deltas/2022061412000000_history_visibility_column.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas @@ -20,7 +12,7 @@ import ( "encoding/json" "fmt" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/syncapi/storage/sqlite3/filter_table.go b/syncapi/storage/sqlite3/filter_table.go index 8da4f299cb..f55595e0c0 100644 --- a/syncapi/storage/sqlite3/filter_table.go +++ b/syncapi/storage/sqlite3/filter_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Jan Christian Grünhage // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,9 +12,9 @@ import ( "encoding/json" "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/syncapi/storage/sqlite3/filtering.go b/syncapi/storage/sqlite3/filtering.go index 17a37a2df1..50cdd537d2 100644 --- a/syncapi/storage/sqlite3/filtering.go +++ b/syncapi/storage/sqlite3/filtering.go @@ -4,7 +4,7 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" ) type FilterOrder int diff --git a/syncapi/storage/sqlite3/ignores_table.go b/syncapi/storage/sqlite3/ignores_table.go index bff5780b06..fa40ab1bc9 100644 --- a/syncapi/storage/sqlite3/ignores_table.go +++ b/syncapi/storage/sqlite3/ignores_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,9 +11,9 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const ignoresSchema = ` diff --git a/syncapi/storage/sqlite3/invites_table.go b/syncapi/storage/sqlite3/invites_table.go index e50b5cbf81..b311e80ac2 100644 --- a/syncapi/storage/sqlite3/invites_table.go +++ b/syncapi/storage/sqlite3/invites_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,11 +12,11 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const inviteEventsSchema = ` diff --git a/syncapi/storage/sqlite3/memberships_table.go b/syncapi/storage/sqlite3/memberships_table.go index 9e50422e5f..bbf5639c32 100644 --- a/syncapi/storage/sqlite3/memberships_table.go +++ b/syncapi/storage/sqlite3/memberships_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,11 +11,11 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) // The memberships table is designed to track the last time that diff --git a/syncapi/storage/sqlite3/notification_data_table.go b/syncapi/storage/sqlite3/notification_data_table.go index af2b2c074a..9fd04d56dc 100644 --- a/syncapi/storage/sqlite3/notification_data_table.go +++ b/syncapi/storage/sqlite3/notification_data_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,11 +11,11 @@ import ( "database/sql" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) func NewSqliteNotificationDataTable(db *sql.DB, streamID *StreamIDStatements) (tables.NotificationData, error) { diff --git a/syncapi/storage/sqlite3/output_room_events_table.go b/syncapi/storage/sqlite3/output_room_events_table.go index c7b11d3eff..b8542a1bbc 100644 --- a/syncapi/storage/sqlite3/output_room_events_table.go +++ b/syncapi/storage/sqlite3/output_room_events_table.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -23,16 +15,16 @@ import ( "sort" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" ) const outputRoomEventsSchema = ` diff --git a/syncapi/storage/sqlite3/output_room_events_topology_table.go b/syncapi/storage/sqlite3/output_room_events_topology_table.go index c00fb7a796..9ef46c42ef 100644 --- a/syncapi/storage/sqlite3/output_room_events_topology_table.go +++ b/syncapi/storage/sqlite3/output_room_events_topology_table.go @@ -1,16 +1,7 @@ -// Copyright 2018 New Vector Ltd +// Copyright 2018-2024 New Vector Ltd. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,11 +9,11 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const outputRoomEventsTopologySchema = ` diff --git a/syncapi/storage/sqlite3/peeks_table.go b/syncapi/storage/sqlite3/peeks_table.go index d8998e2b81..30a0980d04 100644 --- a/syncapi/storage/sqlite3/peeks_table.go +++ b/syncapi/storage/sqlite3/peeks_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,10 +11,10 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const peeksSchema = ` diff --git a/syncapi/storage/sqlite3/presence_table.go b/syncapi/storage/sqlite3/presence_table.go index 40b57e75de..f1f9054172 100644 --- a/syncapi/storage/sqlite3/presence_table.go +++ b/syncapi/storage/sqlite3/presence_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -22,10 +14,10 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" ) const presenceSchema = ` diff --git a/syncapi/storage/sqlite3/receipt_table.go b/syncapi/storage/sqlite3/receipt_table.go index b973903bd6..b1330d942e 100644 --- a/syncapi/storage/sqlite3/receipt_table.go +++ b/syncapi/storage/sqlite3/receipt_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,11 +12,11 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/storage/sqlite3/relations_table.go b/syncapi/storage/sqlite3/relations_table.go index 7cbb5408f1..e9048055fa 100644 --- a/syncapi/storage/sqlite3/relations_table.go +++ b/syncapi/storage/sqlite3/relations_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,10 +10,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" ) const relationsSchema = ` diff --git a/syncapi/storage/sqlite3/send_to_device_table.go b/syncapi/storage/sqlite3/send_to_device_table.go index 998a063cd4..d9622c52c5 100644 --- a/syncapi/storage/sqlite3/send_to_device_table.go +++ b/syncapi/storage/sqlite3/send_to_device_table.go @@ -1,16 +1,8 @@ -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,11 +11,11 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" "github.com/sirupsen/logrus" ) diff --git a/syncapi/storage/sqlite3/stream_id_table.go b/syncapi/storage/sqlite3/stream_id_table.go index b51eccf553..f0a5aec3a9 100644 --- a/syncapi/storage/sqlite3/stream_id_table.go +++ b/syncapi/storage/sqlite3/stream_id_table.go @@ -4,8 +4,8 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/types" ) const streamIDTableSchema = ` diff --git a/syncapi/storage/sqlite3/syncserver.go b/syncapi/storage/sqlite3/syncserver.go index e1372f10bf..bc6e29c0ca 100644 --- a/syncapi/storage/sqlite3/syncserver.go +++ b/syncapi/storage/sqlite3/syncserver.go @@ -1,17 +1,9 @@ -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,10 +11,10 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/shared" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/shared" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3/deltas" ) // SyncServerDatasource represents a sync server datasource which manages diff --git a/syncapi/storage/storage.go b/syncapi/storage/storage.go index e05f9d9115..0c84180479 100644 --- a/syncapi/storage/storage.go +++ b/syncapi/storage/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm @@ -21,10 +13,10 @@ import ( "context" "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" ) // NewSyncServerDatasource opens a database connection. diff --git a/syncapi/storage/storage_test.go b/syncapi/storage/storage_test.go index ce7ca3fc7d..4b60b27358 100644 --- a/syncapi/storage/storage_test.go +++ b/syncapi/storage/storage_test.go @@ -9,14 +9,14 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" diff --git a/syncapi/storage/storage_wasm.go b/syncapi/storage/storage_wasm.go index db0b173bbc..acfd32fbbc 100644 --- a/syncapi/storage/storage_wasm.go +++ b/syncapi/storage/storage_wasm.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -18,9 +10,9 @@ import ( "context" "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" ) // NewPublicRoomsServerDatabase opens a database connection. diff --git a/syncapi/storage/tables/current_room_state_test.go b/syncapi/storage/tables/current_room_state_test.go index 2df111a267..8f09522216 100644 --- a/syncapi/storage/tables/current_room_state_test.go +++ b/syncapi/storage/tables/current_room_state_test.go @@ -6,14 +6,14 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/storage/tables/interface.go b/syncapi/storage/tables/interface.go index 45117d6d30..cbe0f37b95 100644 --- a/syncapi/storage/tables/interface.go +++ b/syncapi/storage/tables/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package tables @@ -21,11 +13,11 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" ) type AccountData interface { diff --git a/syncapi/storage/tables/memberships_test.go b/syncapi/storage/tables/memberships_test.go index 0a36f5887b..93489a045c 100644 --- a/syncapi/storage/tables/memberships_test.go +++ b/syncapi/storage/tables/memberships_test.go @@ -8,14 +8,14 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal/sqlutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" ) func newMembershipsTable(t *testing.T, dbType test.DBType) (tables.Memberships, *sql.DB, func()) { diff --git a/syncapi/storage/tables/output_room_events_test.go b/syncapi/storage/tables/output_room_events_test.go index 9b755dc85d..86758ea647 100644 --- a/syncapi/storage/tables/output_room_events_test.go +++ b/syncapi/storage/tables/output_room_events_test.go @@ -7,13 +7,13 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/storage/tables/presence_table_test.go b/syncapi/storage/tables/presence_table_test.go index d8161836b1..9105b889db 100644 --- a/syncapi/storage/tables/presence_table_test.go +++ b/syncapi/storage/tables/presence_table_test.go @@ -7,14 +7,14 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/storage/tables/relations_test.go b/syncapi/storage/tables/relations_test.go index 46270e36dc..b82cef140c 100644 --- a/syncapi/storage/tables/relations_test.go +++ b/syncapi/storage/tables/relations_test.go @@ -5,13 +5,13 @@ import ( "database/sql" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" ) func newRelationsTable(t *testing.T, dbType test.DBType) (tables.Relations, *sql.DB, func()) { diff --git a/syncapi/storage/tables/topology_test.go b/syncapi/storage/tables/topology_test.go index 7691cc5f84..200d32144a 100644 --- a/syncapi/storage/tables/topology_test.go +++ b/syncapi/storage/tables/topology_test.go @@ -6,13 +6,13 @@ import ( "fmt" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/storage/postgres" - "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" - "github.com/matrix-org/dendrite/syncapi/storage/tables" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/storage/postgres" + "github.com/element-hq/dendrite/syncapi/storage/sqlite3" + "github.com/element-hq/dendrite/syncapi/storage/tables" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" "github.com/stretchr/testify/assert" ) diff --git a/syncapi/streams/stream_accountdata.go b/syncapi/streams/stream_accountdata.go index 51f2a3d30f..e072183487 100644 --- a/syncapi/streams/stream_accountdata.go +++ b/syncapi/streams/stream_accountdata.go @@ -3,10 +3,10 @@ package streams import ( "context" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/streams/stream_devicelist.go b/syncapi/streams/stream_devicelist.go index e8189c352f..fc61b65993 100644 --- a/syncapi/streams/stream_devicelist.go +++ b/syncapi/streams/stream_devicelist.go @@ -3,11 +3,11 @@ package streams import ( "context" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/internal" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/syncapi/internal" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) type DeviceListStreamProvider struct { diff --git a/syncapi/streams/stream_invite.go b/syncapi/streams/stream_invite.go index a3634c03fe..0f2f612f39 100644 --- a/syncapi/streams/stream_invite.go +++ b/syncapi/streams/stream_invite.go @@ -10,10 +10,10 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" ) type InviteStreamProvider struct { diff --git a/syncapi/streams/stream_notificationdata.go b/syncapi/streams/stream_notificationdata.go index 66ee0ded9f..2c1eb4ed52 100644 --- a/syncapi/streams/stream_notificationdata.go +++ b/syncapi/streams/stream_notificationdata.go @@ -3,9 +3,9 @@ package streams import ( "context" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/types" ) type NotificationDataStreamProvider struct { diff --git a/syncapi/streams/stream_pdu.go b/syncapi/streams/stream_pdu.go index 790f5bd1b1..e55ff168fc 100644 --- a/syncapi/streams/stream_pdu.go +++ b/syncapi/streams/stream_pdu.go @@ -6,17 +6,17 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/caching" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/internal" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/caching" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/internal" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/notifier" "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" ) diff --git a/syncapi/streams/stream_presence.go b/syncapi/streams/stream_presence.go index 3242406676..2ede6ab405 100644 --- a/syncapi/streams/stream_presence.go +++ b/syncapi/streams/stream_presence.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package streams @@ -22,10 +14,10 @@ import ( "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/streams/stream_receipt.go b/syncapi/streams/stream_receipt.go index ed52dc5c70..8a4f06b8a9 100644 --- a/syncapi/streams/stream_receipt.go +++ b/syncapi/streams/stream_receipt.go @@ -6,9 +6,9 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" ) type ReceiptStreamProvider struct { diff --git a/syncapi/streams/stream_sendtodevice.go b/syncapi/streams/stream_sendtodevice.go index 00b67cc427..6d20527ccb 100644 --- a/syncapi/streams/stream_sendtodevice.go +++ b/syncapi/streams/stream_sendtodevice.go @@ -3,8 +3,8 @@ package streams import ( "context" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/types" ) type SendToDeviceStreamProvider struct { diff --git a/syncapi/streams/stream_typing.go b/syncapi/streams/stream_typing.go index 15500a470f..d0372021d4 100644 --- a/syncapi/streams/stream_typing.go +++ b/syncapi/streams/stream_typing.go @@ -4,10 +4,10 @@ import ( "context" "encoding/json" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/streams/streamprovider.go b/syncapi/streams/streamprovider.go index 8b12e2ebae..fde6f43645 100644 --- a/syncapi/streams/streamprovider.go +++ b/syncapi/streams/streamprovider.go @@ -3,8 +3,8 @@ package streams import ( "context" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/types" ) type StreamProvider interface { diff --git a/syncapi/streams/streams.go b/syncapi/streams/streams.go index f25bc978fb..b918b50fcc 100644 --- a/syncapi/streams/streams.go +++ b/syncapi/streams/streams.go @@ -3,13 +3,13 @@ package streams import ( "context" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) type Streams struct { diff --git a/syncapi/streams/template_stream.go b/syncapi/streams/template_stream.go index f208d84e47..3529c3f240 100644 --- a/syncapi/streams/template_stream.go +++ b/syncapi/streams/template_stream.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/types" ) type DefaultStreamProvider struct { diff --git a/syncapi/sync/request.go b/syncapi/sync/request.go index 6173423315..4b1c57c738 100644 --- a/syncapi/sync/request.go +++ b/syncapi/sync/request.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sync @@ -27,10 +19,10 @@ import ( "github.com/matrix-org/util" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) const defaultSyncTimeout = time.Duration(0) diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index 494be05f7f..3b80d48759 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -1,18 +1,10 @@ +// Copyright 2024 New Vector Ltd. +// Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +// Copyright 2017, 2018 New Vector Ltd // Copyright 2017 Vector Creations Ltd -// Copyright 2017-2018 New Vector Ltd -// Copyright 2019-2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sync @@ -30,15 +22,15 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/sqlutil" - roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/internal" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/types" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/internal/sqlutil" + roomserverAPI "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/internal" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/types" + userapi "github.com/element-hq/dendrite/userapi/api" ) // RequestPool manages HTTP long-poll connections for /sync diff --git a/syncapi/sync/requestpool_test.go b/syncapi/sync/requestpool_test.go index e083507e88..e953bb930f 100644 --- a/syncapi/sync/requestpool_test.go +++ b/syncapi/sync/requestpool_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go index 0418ffc054..2b1dc9958c 100644 --- a/syncapi/syncapi.go +++ b/syncapi/syncapi.go @@ -1,42 +1,34 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package syncapi import ( "context" - "github.com/matrix-org/dendrite/internal/fulltext" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/internal/fulltext" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/caching" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/jetstream" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/jetstream" + userapi "github.com/element-hq/dendrite/userapi/api" - "github.com/matrix-org/dendrite/syncapi/consumers" - "github.com/matrix-org/dendrite/syncapi/notifier" - "github.com/matrix-org/dendrite/syncapi/producers" - "github.com/matrix-org/dendrite/syncapi/routing" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/streams" - "github.com/matrix-org/dendrite/syncapi/sync" + "github.com/element-hq/dendrite/syncapi/consumers" + "github.com/element-hq/dendrite/syncapi/notifier" + "github.com/element-hq/dendrite/syncapi/producers" + "github.com/element-hq/dendrite/syncapi/routing" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/streams" + "github.com/element-hq/dendrite/syncapi/sync" ) // AddPublicRoutes sets up and registers HTTP handlers for the SyncAPI diff --git a/syncapi/syncapi_test.go b/syncapi/syncapi_test.go index d360e10d91..4e1fa7dfbc 100644 --- a/syncapi/syncapi_test.go +++ b/syncapi/syncapi_test.go @@ -11,31 +11,31 @@ import ( "testing" "time" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/httputil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" "github.com/gorilla/mux" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/httputil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" "github.com/tidwall/gjson" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/routing" - "github.com/matrix-org/dendrite/syncapi/storage" - "github.com/matrix-org/dendrite/syncapi/synctypes" - - "github.com/matrix-org/dendrite/clientapi/producers" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/roomserver/api" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - userapi "github.com/matrix-org/dendrite/userapi/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/routing" + "github.com/element-hq/dendrite/syncapi/storage" + "github.com/element-hq/dendrite/syncapi/synctypes" + + "github.com/element-hq/dendrite/clientapi/producers" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/roomserver/api" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + userapi "github.com/element-hq/dendrite/userapi/api" ) type syncRoomserverAPI struct { diff --git a/syncapi/synctypes/clientevent.go b/syncapi/synctypes/clientevent.go index fe4f6c07f0..640b03ea6f 100644 --- a/syncapi/synctypes/clientevent.go +++ b/syncapi/synctypes/clientevent.go @@ -1,16 +1,8 @@ -/* Copyright 2017 Vector Creations Ltd +/* Copyright 2024 New Vector Ltd. + * Copyright 2017 Vector Creations Ltd * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. */ package synctypes diff --git a/syncapi/synctypes/clientevent_test.go b/syncapi/synctypes/clientevent_test.go index 662f9ea43b..7b0699f753 100644 --- a/syncapi/synctypes/clientevent_test.go +++ b/syncapi/synctypes/clientevent_test.go @@ -1,16 +1,8 @@ -/* Copyright 2017 Vector Creations Ltd +/* Copyright 2024 New Vector Ltd. + * Copyright 2017 Vector Creations Ltd * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. */ package synctypes diff --git a/syncapi/synctypes/filter.go b/syncapi/synctypes/filter.go index 8998d44330..0ffd0443b0 100644 --- a/syncapi/synctypes/filter.go +++ b/syncapi/synctypes/filter.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Jan Christian Grünhage // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package synctypes diff --git a/syncapi/types/presence.go b/syncapi/types/presence.go index a9c5e3a429..98f3b14d65 100644 --- a/syncapi/types/presence.go +++ b/syncapi/types/presence.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package types diff --git a/syncapi/types/provider.go b/syncapi/types/provider.go index a0fcec0f6a..95e7040afd 100644 --- a/syncapi/types/provider.go +++ b/syncapi/types/provider.go @@ -6,8 +6,8 @@ import ( "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/syncapi/synctypes" - userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/syncapi/synctypes" + userapi "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/syncapi/types/types.go b/syncapi/types/types.go index 26faf7c05a..de20a6088b 100644 --- a/syncapi/types/types.go +++ b/syncapi/types/types.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package types @@ -26,9 +18,9 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/tidwall/gjson" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/synctypes" ) var ( diff --git a/syncapi/types/types_test.go b/syncapi/types/types_test.go index 6c616ab0d2..15271fb4af 100644 --- a/syncapi/types/types_test.go +++ b/syncapi/types/types_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/syncapi/synctypes" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/test/db.go b/test/db.go index d2f405d49d..6f117096e7 100644 --- a/test/db.go +++ b/test/db.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test diff --git a/test/event.go b/test/event.go index 197f80e13e..e77bd9c3bd 100644 --- a/test/event.go +++ b/test/event.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test @@ -20,7 +12,7 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/test/keyring.go b/test/keyring.go index ed9c34849c..a7e5ef138c 100644 --- a/test/keyring.go +++ b/test/keyring.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test diff --git a/test/keys.go b/test/keys.go index 05f7317cfb..7f160bb381 100644 --- a/test/keys.go +++ b/test/keys.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test diff --git a/test/memory_federation_db.go b/test/memory_federation_db.go index 76034143fa..d84cb15928 100644 --- a/test/memory_federation_db.go +++ b/test/memory_federation_db.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test @@ -21,9 +13,9 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/federationapi/storage/shared/receipt" - "github.com/matrix-org/dendrite/federationapi/types" - rstypes "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/federationapi/storage/shared/receipt" + "github.com/element-hq/dendrite/federationapi/types" + rstypes "github.com/element-hq/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/test/memory_relay_db.go b/test/memory_relay_db.go index eecc23fe7d..af9faf921f 100644 --- a/test/memory_relay_db.go +++ b/test/memory_relay_db.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test diff --git a/test/room.go b/test/room.go index da09de7c2a..51e563798b 100644 --- a/test/room.go +++ b/test/room.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test @@ -24,8 +16,8 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal/eventutil" - rstypes "github.com/matrix-org/dendrite/roomserver/types" + "github.com/element-hq/dendrite/internal/eventutil" + rstypes "github.com/element-hq/dendrite/roomserver/types" ) type Preset int diff --git a/test/slice.go b/test/slice.go index 00c740db76..73beaa357b 100644 --- a/test/slice.go +++ b/test/slice.go @@ -1,14 +1,7 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Copyright 2024 New Vector Ltd. // -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test diff --git a/test/testrig/base.go b/test/testrig/base.go index a21cfe8027..6c275a3ee4 100644 --- a/test/testrig/base.go +++ b/test/testrig/base.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package testrig @@ -19,9 +11,9 @@ import ( "path/filepath" "testing" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/test" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/test" ) func CreateConfig(t *testing.T, dbType test.DBType) (*config.Dendrite, *process.ProcessContext, func()) { diff --git a/test/testrig/jetstream.go b/test/testrig/jetstream.go index 5f15cfb3ea..ad04597483 100644 --- a/test/testrig/jetstream.go +++ b/test/testrig/jetstream.go @@ -4,11 +4,11 @@ import ( "encoding/json" "testing" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/config" "github.com/nats-io/nats.go" - "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/jetstream" ) func MustPublishMsgs(t *testing.T, jsctx nats.JetStreamContext, msgs ...*nats.Msg) { diff --git a/test/user.go b/test/user.go index 9509b95a62..67eea7cdcc 100644 --- a/test/user.go +++ b/test/user.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package test @@ -21,7 +13,7 @@ import ( "sync/atomic" "testing" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/test/wasm/index.js b/test/wasm/index.js index fce5753c8a..a3a0277a71 100755 --- a/test/wasm/index.js +++ b/test/wasm/index.js @@ -1,52 +1,44 @@ #!/usr/bin/env node /* +Copyright 2024 New Vector Ltd. Copyright 2021 The Matrix.org Foundation C.I.C. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +Please see LICENSE files in the repository root for full details. */ -const fs = require('fs'); -const path = require('path'); -const childProcess = require('child_process'); - -(async function() { - // sql.js - const initSqlJs = require('sql.js'); - await initSqlJs().then(SQL => { - global._go_sqlite = SQL; - console.log("Loaded sqlite") - }); - // dendritejs expects to write to `/idb` so we create that here - // Since this is testing only, we use the default in-memory FS - global._go_sqlite.FS.mkdir("/idb"); - - // WebSocket - const WebSocket = require('isomorphic-ws'); - global.WebSocket = WebSocket; - - // Load the generic Go Wasm exec helper inline to trigger built-in run call - // This approach avoids copying `wasm_exec.js` into the repo, which is nice - // to aim for since it can differ between Go versions. - const goRoot = await new Promise((resolve, reject) => { - childProcess.execFile('go', ['env', 'GOROOT'], (err, out) => { - if (err) { - reject("Can't find go"); - } - resolve(out.trim()); - }); +const fs = require("fs"); +const path = require("path"); +const childProcess = require("child_process"); + +(async function () { + // sql.js + const initSqlJs = require("sql.js"); + await initSqlJs().then((SQL) => { + global._go_sqlite = SQL; + console.log("Loaded sqlite"); + }); + // dendritejs expects to write to `/idb` so we create that here + // Since this is testing only, we use the default in-memory FS + global._go_sqlite.FS.mkdir("/idb"); + + // WebSocket + const WebSocket = require("isomorphic-ws"); + global.WebSocket = WebSocket; + + // Load the generic Go Wasm exec helper inline to trigger built-in run call + // This approach avoids copying `wasm_exec.js` into the repo, which is nice + // to aim for since it can differ between Go versions. + const goRoot = await new Promise((resolve, reject) => { + childProcess.execFile("go", ["env", "GOROOT"], (err, out) => { + if (err) { + reject("Can't find go"); + } + resolve(out.trim()); }); - const execPath = path.join(goRoot, 'misc/wasm/wasm_exec.js'); - const execCode = fs.readFileSync(execPath, 'utf8'); - eval(execCode); + }); + const execPath = path.join(goRoot, "misc/wasm/wasm_exec.js"); + const execCode = fs.readFileSync(execPath, "utf8"); + eval(execCode); })(); diff --git a/userapi/api/api.go b/userapi/api/api.go index d4daec8204..6da12fc9eb 100644 --- a/userapi/api/api.go +++ b/userapi/api/api.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api @@ -21,15 +13,15 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - clientapi "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/pushrules" + clientapi "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal/pushrules" ) // UserInternalAPI is the internal API for information about users and devices. diff --git a/userapi/api/api_logintoken.go b/userapi/api/api_logintoken.go index e2207bb533..b7ee9baac5 100644 --- a/userapi/api/api_logintoken.go +++ b/userapi/api/api_logintoken.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package api diff --git a/userapi/consumers/clientapi.go b/userapi/consumers/clientapi.go index ba72ff350c..927996e619 100644 --- a/userapi/consumers/clientapi.go +++ b/userapi/consumers/clientapi.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -22,14 +14,14 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/pushgateway" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/internal/pushgateway" + "github.com/element-hq/dendrite/userapi/storage" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/userapi/producers" - "github.com/matrix-org/dendrite/userapi/util" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/userapi/producers" + "github.com/element-hq/dendrite/userapi/util" ) // OutputReceiptEventConsumer consumes events that originated in the clientAPI. diff --git a/userapi/consumers/devicelistupdate.go b/userapi/consumers/devicelistupdate.go index b3ccb573b3..7f7f593f68 100644 --- a/userapi/consumers/devicelistupdate.go +++ b/userapi/consumers/devicelistupdate.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -19,15 +11,15 @@ import ( "encoding/json" "time" - "github.com/matrix-org/dendrite/userapi/internal" + "github.com/element-hq/dendrite/userapi/internal" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" ) // DeviceListUpdateConsumer consumes device list updates that came in over federation. diff --git a/userapi/consumers/roomserver.go b/userapi/consumers/roomserver.go index fca7412983..a79441f336 100644 --- a/userapi/consumers/roomserver.go +++ b/userapi/consumers/roomserver.go @@ -17,22 +17,22 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/pushgateway" - "github.com/matrix-org/dendrite/internal/pushrules" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - rstypes "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/producers" - "github.com/matrix-org/dendrite/userapi/storage" - "github.com/matrix-org/dendrite/userapi/storage/tables" - userAPITypes "github.com/matrix-org/dendrite/userapi/types" - "github.com/matrix-org/dendrite/userapi/util" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/pushgateway" + "github.com/element-hq/dendrite/internal/pushrules" + rsapi "github.com/element-hq/dendrite/roomserver/api" + rstypes "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/producers" + "github.com/element-hq/dendrite/userapi/storage" + "github.com/element-hq/dendrite/userapi/storage/tables" + userAPITypes "github.com/element-hq/dendrite/userapi/types" + "github.com/element-hq/dendrite/userapi/util" ) type OutputRoomEventConsumer struct { diff --git a/userapi/consumers/roomserver_test.go b/userapi/consumers/roomserver_test.go index 7b7c086183..79b1b8e782 100644 --- a/userapi/consumers/roomserver_test.go +++ b/userapi/consumers/roomserver_test.go @@ -8,23 +8,23 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/roomserver" - "github.com/matrix-org/dendrite/roomserver/types" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/test/testrig" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/roomserver" + "github.com/element-hq/dendrite/roomserver/types" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/test/testrig" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/stretchr/testify/assert" "golang.org/x/crypto/bcrypt" - "github.com/matrix-org/dendrite/internal/pushrules" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi/storage" - userAPITypes "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal/pushrules" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi/storage" + userAPITypes "github.com/element-hq/dendrite/userapi/types" ) func mustCreateDatabase(t *testing.T, dbType test.DBType) (storage.UserDatabase, func()) { diff --git a/userapi/consumers/signingkeyupdate.go b/userapi/consumers/signingkeyupdate.go index 9de866343f..5f62b21d8b 100644 --- a/userapi/consumers/signingkeyupdate.go +++ b/userapi/consumers/signingkeyupdate.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package consumers @@ -24,10 +16,10 @@ import ( "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/userapi/api" ) // SigningKeyUpdateConsumer consumes signing key updates that came in over federation. diff --git a/userapi/internal/api_logintoken.go b/userapi/internal/api_logintoken.go index 3b211db5bb..d3e4d357b6 100644 --- a/userapi/internal/api_logintoken.go +++ b/userapi/internal/api_logintoken.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -19,7 +11,7 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" ) diff --git a/userapi/internal/cross_signing.go b/userapi/internal/cross_signing.go index be05841c4e..fe5d9f7d91 100644 --- a/userapi/internal/cross_signing.go +++ b/userapi/internal/cross_signing.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -22,8 +14,8 @@ import ( "fmt" "strings" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" diff --git a/userapi/internal/device_list_update.go b/userapi/internal/device_list_update.go index b406351605..cea51b4d50 100644 --- a/userapi/internal/device_list_update.go +++ b/userapi/internal/device_list_update.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -25,8 +17,8 @@ import ( "sync" "time" - "github.com/matrix-org/dendrite/federationapi/statistics" - rsapi "github.com/matrix-org/dendrite/roomserver/api" + "github.com/element-hq/dendrite/federationapi/statistics" + rsapi "github.com/element-hq/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" @@ -36,9 +28,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" - fedsenderapi "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/userapi/api" + fedsenderapi "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/userapi/api" ) var ( diff --git a/userapi/internal/device_list_update_default.go b/userapi/internal/device_list_update_default.go index 7d357c9518..53c2a74b69 100644 --- a/userapi/internal/device_list_update_default.go +++ b/userapi/internal/device_list_update_default.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !vw diff --git a/userapi/internal/device_list_update_sytest.go b/userapi/internal/device_list_update_sytest.go index 1c60d2eb9d..f6021a89bf 100644 --- a/userapi/internal/device_list_update_sytest.go +++ b/userapi/internal/device_list_update_sytest.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build vw diff --git a/userapi/internal/device_list_update_test.go b/userapi/internal/device_list_update_test.go index a2f1869d1c..8b450104ec 100644 --- a/userapi/internal/device_list_update_test.go +++ b/userapi/internal/device_list_update_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -27,20 +19,20 @@ import ( "testing" "time" - api2 "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/internal/caching" - "github.com/matrix-org/dendrite/internal/sqlutil" + api2 "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/internal/caching" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - roomserver "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage" + roomserver "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage" ) var ( diff --git a/userapi/internal/key_api.go b/userapi/internal/key_api.go index 81127481ec..09ead2c574 100644 --- a/userapi/internal/key_api.go +++ b/userapi/internal/key_api.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -31,7 +23,7 @@ import ( "github.com/tidwall/gjson" "github.com/tidwall/sjson" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" ) func (a *UserInternalAPI) QueryKeyChanges(ctx context.Context, req *api.QueryKeyChangesRequest, res *api.QueryKeyChangesResponse) error { diff --git a/userapi/internal/key_api_test.go b/userapi/internal/key_api_test.go index de2a6d2c84..03d8e742e0 100644 --- a/userapi/internal/key_api_test.go +++ b/userapi/internal/key_api_test.go @@ -5,12 +5,12 @@ import ( "reflect" "testing" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/internal" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/internal" + "github.com/element-hq/dendrite/userapi/storage" ) func mustCreateDatabase(t *testing.T, dbType test.DBType) (storage.KeyDatabase, func()) { diff --git a/userapi/internal/user_api.go b/userapi/internal/user_api.go index fd73bf62fd..666e75f938 100644 --- a/userapi/internal/user_api.go +++ b/userapi/internal/user_api.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package internal @@ -23,29 +15,29 @@ import ( "strconv" "time" - appserviceAPI "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - fedsenderapi "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/internal/pushrules" + appserviceAPI "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + fedsenderapi "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/internal/pushrules" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/sirupsen/logrus" "golang.org/x/crypto/bcrypt" - clientapi "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/internal/pushgateway" - "github.com/matrix-org/dendrite/internal/sqlutil" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/config" - synctypes "github.com/matrix-org/dendrite/syncapi/types" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/producers" - "github.com/matrix-org/dendrite/userapi/storage" - "github.com/matrix-org/dendrite/userapi/storage/tables" - userapiUtil "github.com/matrix-org/dendrite/userapi/util" + clientapi "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/internal/pushgateway" + "github.com/element-hq/dendrite/internal/sqlutil" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/config" + synctypes "github.com/element-hq/dendrite/syncapi/types" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/producers" + "github.com/element-hq/dendrite/userapi/storage" + "github.com/element-hq/dendrite/userapi/storage/tables" + userapiUtil "github.com/element-hq/dendrite/userapi/util" ) type UserInternalAPI struct { diff --git a/userapi/producers/keychange.go b/userapi/producers/keychange.go index da6cea31a7..b69340d9f6 100644 --- a/userapi/producers/keychange.go +++ b/userapi/producers/keychange.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package producers @@ -18,9 +10,9 @@ import ( "context" "encoding/json" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage" "github.com/nats-io/nats.go" "github.com/sirupsen/logrus" ) diff --git a/userapi/producers/syncapi.go b/userapi/producers/syncapi.go index 165de89940..cf55bda45b 100644 --- a/userapi/producers/syncapi.go +++ b/userapi/producers/syncapi.go @@ -8,9 +8,9 @@ import ( "github.com/nats-io/nats.go" log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal/eventutil" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/internal/eventutil" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/userapi/storage" ) type JetStreamPublisher interface { diff --git a/userapi/storage/interface.go b/userapi/storage/interface.go index 125b315853..7767f6cdb9 100644 --- a/userapi/storage/interface.go +++ b/userapi/storage/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -23,12 +15,12 @@ import ( "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - clientapi "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/pushrules" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + clientapi "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal/pushrules" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" ) type RegistrationTokens interface { diff --git a/userapi/storage/postgres/account_data_table.go b/userapi/storage/postgres/account_data_table.go index 6ffda340eb..251b3c3fab 100644 --- a/userapi/storage/postgres/account_data_table.go +++ b/userapi/storage/postgres/account_data_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/postgres/accounts_table.go b/userapi/storage/postgres/accounts_table.go index 5b38c5f4b6..489017fb94 100644 --- a/userapi/storage/postgres/accounts_table.go +++ b/userapi/storage/postgres/accounts_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" log "github.com/sirupsen/logrus" diff --git a/userapi/storage/postgres/cross_signing_keys_table.go b/userapi/storage/postgres/cross_signing_keys_table.go index deb355718c..a8566e69bd 100644 --- a/userapi/storage/postgres/cross_signing_keys_table.go +++ b/userapi/storage/postgres/cross_signing_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/postgres/cross_signing_sigs_table.go b/userapi/storage/postgres/cross_signing_sigs_table.go index cba015e136..5797b067e7 100644 --- a/userapi/storage/postgres/cross_signing_sigs_table.go +++ b/userapi/storage/postgres/cross_signing_sigs_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,11 +11,11 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/postgres/deltas/2022012016470000_key_changes.go b/userapi/storage/postgres/deltas/2022012016470000_key_changes.go index 0cfe9e7914..68ae1e83b3 100644 --- a/userapi/storage/postgres/deltas/2022012016470000_key_changes.go +++ b/userapi/storage/postgres/deltas/2022012016470000_key_changes.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/userapi/storage/postgres/deltas/2022042612000000_xsigning_idx.go b/userapi/storage/postgres/deltas/2022042612000000_xsigning_idx.go index 1a3d4fee9f..6bf6c7e737 100644 --- a/userapi/storage/postgres/deltas/2022042612000000_xsigning_idx.go +++ b/userapi/storage/postgres/deltas/2022042612000000_xsigning_idx.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/userapi/storage/postgres/device_keys_table.go b/userapi/storage/postgres/device_keys_table.go index a9203857fe..02c141a22c 100644 --- a/userapi/storage/postgres/device_keys_table.go +++ b/userapi/storage/postgres/device_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -21,10 +13,10 @@ import ( "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" ) var deviceKeysSchema = ` diff --git a/userapi/storage/postgres/devices_table.go b/userapi/storage/postgres/devices_table.go index 0335f82665..b5feea07fb 100644 --- a/userapi/storage/postgres/devices_table.go +++ b/userapi/storage/postgres/devices_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,13 +12,13 @@ import ( "fmt" "time" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/lib/pq" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/postgres/key_backup_table.go b/userapi/storage/postgres/key_backup_table.go index 59944a125b..df25ea12d4 100644 --- a/userapi/storage/postgres/key_backup_table.go +++ b/userapi/storage/postgres/key_backup_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" ) const keyBackupTableSchema = ` diff --git a/userapi/storage/postgres/key_backup_version_table.go b/userapi/storage/postgres/key_backup_version_table.go index 67c5e5481e..16520bad72 100644 --- a/userapi/storage/postgres/key_backup_version_table.go +++ b/userapi/storage/postgres/key_backup_version_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -21,8 +13,8 @@ import ( "fmt" "strconv" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" ) const keyBackupVersionTableSchema = ` diff --git a/userapi/storage/postgres/key_changes_table.go b/userapi/storage/postgres/key_changes_table.go index de3a9e9c8b..0d522b0bef 100644 --- a/userapi/storage/postgres/key_changes_table.go +++ b/userapi/storage/postgres/key_changes_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,10 +12,10 @@ import ( "errors" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" ) var keyChangesSchema = ` diff --git a/userapi/storage/postgres/logintoken_table.go b/userapi/storage/postgres/logintoken_table.go index 44c6ca4ae4..8d98295b30 100644 --- a/userapi/storage/postgres/logintoken_table.go +++ b/userapi/storage/postgres/logintoken_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,9 +11,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/util" ) diff --git a/userapi/storage/postgres/notifications_table.go b/userapi/storage/postgres/notifications_table.go index acb9e42bcf..3afc043649 100644 --- a/userapi/storage/postgres/notifications_table.go +++ b/userapi/storage/postgres/notifications_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 Dan Peleg // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -22,10 +14,10 @@ import ( log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/postgres/one_time_keys_table.go b/userapi/storage/postgres/one_time_keys_table.go index a00f4d6f66..dde63a17f0 100644 --- a/userapi/storage/postgres/one_time_keys_table.go +++ b/userapi/storage/postgres/one_time_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,11 +12,11 @@ import ( "encoding/json" "time" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" ) var oneTimeKeysSchema = ` diff --git a/userapi/storage/postgres/openid_table.go b/userapi/storage/postgres/openid_table.go index 345877d11c..bd5c329bc8 100644 --- a/userapi/storage/postgres/openid_table.go +++ b/userapi/storage/postgres/openid_table.go @@ -5,9 +5,9 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" log "github.com/sirupsen/logrus" ) diff --git a/userapi/storage/postgres/profile_table.go b/userapi/storage/postgres/profile_table.go index e4f55ed94e..9508b57100 100644 --- a/userapi/storage/postgres/profile_table.go +++ b/userapi/storage/postgres/profile_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -19,10 +11,10 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/postgres/pusher_table.go b/userapi/storage/postgres/pusher_table.go index 2e88aa8e98..ad94eba7ff 100644 --- a/userapi/storage/postgres/pusher_table.go +++ b/userapi/storage/postgres/pusher_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 Dan Peleg // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -21,10 +13,10 @@ import ( "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/postgres/registration_tokens_table.go b/userapi/storage/postgres/registration_tokens_table.go index 3c3e3fdd93..1c691e0e86 100644 --- a/userapi/storage/postgres/registration_tokens_table.go +++ b/userapi/storage/postgres/registration_tokens_table.go @@ -5,10 +5,10 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/clientapi/api" - internal "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/clientapi/api" + internal "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "golang.org/x/exp/constraints" ) diff --git a/userapi/storage/postgres/stale_device_lists.go b/userapi/storage/postgres/stale_device_lists.go index e2086dc996..9e859c8af6 100644 --- a/userapi/storage/postgres/stale_device_lists.go +++ b/userapi/storage/postgres/stale_device_lists.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -21,11 +13,11 @@ import ( "github.com/lib/pq" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/userapi/storage/postgres/stats_table.go b/userapi/storage/postgres/stats_table.go index a7949e4bab..b11ab5910c 100644 --- a/userapi/storage/postgres/stats_table.go +++ b/userapi/storage/postgres/stats_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -23,11 +15,11 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" ) const userDailyVisitsSchema = ` diff --git a/userapi/storage/postgres/storage.go b/userapi/storage/postgres/storage.go index b4edc80a95..696e1aa6a8 100644 --- a/userapi/storage/postgres/storage.go +++ b/userapi/storage/postgres/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -20,10 +12,10 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/storage/postgres/deltas" - "github.com/matrix-org/dendrite/userapi/storage/shared" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/storage/postgres/deltas" + "github.com/element-hq/dendrite/userapi/storage/shared" "github.com/matrix-org/gomatrixserverlib/spec" // Import the postgres database driver. diff --git a/userapi/storage/postgres/threepid_table.go b/userapi/storage/postgres/threepid_table.go index fc46061dc0..499c5c1f16 100644 --- a/userapi/storage/postgres/threepid_table.go +++ b/userapi/storage/postgres/threepid_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package postgres @@ -18,12 +10,12 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" ) const threepidSchema = ` diff --git a/userapi/storage/shared/storage.go b/userapi/storage/shared/storage.go index b7acb2035e..2b1885cd04 100644 --- a/userapi/storage/shared/storage.go +++ b/userapi/storage/shared/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package shared @@ -31,13 +23,13 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "golang.org/x/crypto/bcrypt" - clientapi "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/pushrules" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + clientapi "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal/pushrules" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" ) // Database represents an account database diff --git a/userapi/storage/sqlite3/account_data_table.go b/userapi/storage/sqlite3/account_data_table.go index 240647b32e..689437ba99 100644 --- a/userapi/storage/sqlite3/account_data_table.go +++ b/userapi/storage/sqlite3/account_data_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,9 +11,9 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/sqlite3/accounts_table.go b/userapi/storage/sqlite3/accounts_table.go index d01915a764..66cc7c0602 100644 --- a/userapi/storage/sqlite3/accounts_table.go +++ b/userapi/storage/sqlite3/accounts_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,11 +11,11 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/clientapi/userutil" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" log "github.com/sirupsen/logrus" diff --git a/userapi/storage/sqlite3/constraint_wasm.go b/userapi/storage/sqlite3/constraint_wasm.go index 6c4ee762f8..8ab34339a9 100644 --- a/userapi/storage/sqlite3/constraint_wasm.go +++ b/userapi/storage/sqlite3/constraint_wasm.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build wasm // +build wasm diff --git a/userapi/storage/sqlite3/cross_signing_keys_table.go b/userapi/storage/sqlite3/cross_signing_keys_table.go index 65b9ff1af3..dd8923d309 100644 --- a/userapi/storage/sqlite3/cross_signing_keys_table.go +++ b/userapi/storage/sqlite3/cross_signing_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,10 +11,10 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/sqlite3/cross_signing_sigs_table.go b/userapi/storage/sqlite3/cross_signing_sigs_table.go index bf400a00e5..ea594bc44b 100644 --- a/userapi/storage/sqlite3/cross_signing_sigs_table.go +++ b/userapi/storage/sqlite3/cross_signing_sigs_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,11 +11,11 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/sqlite3/deltas/2022012016470000_key_changes.go b/userapi/storage/sqlite3/deltas/2022012016470000_key_changes.go index cd0f19df93..62dda5d7c3 100644 --- a/userapi/storage/sqlite3/deltas/2022012016470000_key_changes.go +++ b/userapi/storage/sqlite3/deltas/2022012016470000_key_changes.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/userapi/storage/sqlite3/deltas/2022042612000000_xsigning_idx.go b/userapi/storage/sqlite3/deltas/2022042612000000_xsigning_idx.go index d4e38dea5d..4033da238e 100644 --- a/userapi/storage/sqlite3/deltas/2022042612000000_xsigning_idx.go +++ b/userapi/storage/sqlite3/deltas/2022042612000000_xsigning_idx.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package deltas diff --git a/userapi/storage/sqlite3/device_keys_table.go b/userapi/storage/sqlite3/device_keys_table.go index 15e69cc4c7..314ab75703 100644 --- a/userapi/storage/sqlite3/device_keys_table.go +++ b/userapi/storage/sqlite3/device_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,10 +12,10 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" ) var deviceKeysSchema = ` diff --git a/userapi/storage/sqlite3/devices_table.go b/userapi/storage/sqlite3/devices_table.go index 5ce285c870..d5d1fed3de 100644 --- a/userapi/storage/sqlite3/devices_table.go +++ b/userapi/storage/sqlite3/devices_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,14 +12,14 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/clientapi/userutil" + "github.com/element-hq/dendrite/clientapi/userutil" ) const devicesSchema = ` diff --git a/userapi/storage/sqlite3/key_backup_table.go b/userapi/storage/sqlite3/key_backup_table.go index 1cdaca1802..a53850b33b 100644 --- a/userapi/storage/sqlite3/key_backup_table.go +++ b/userapi/storage/sqlite3/key_backup_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,10 +11,10 @@ import ( "database/sql" "encoding/json" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" ) const keyBackupTableSchema = ` diff --git a/userapi/storage/sqlite3/key_backup_version_table.go b/userapi/storage/sqlite3/key_backup_version_table.go index 37bc13ed10..8f0223977f 100644 --- a/userapi/storage/sqlite3/key_backup_version_table.go +++ b/userapi/storage/sqlite3/key_backup_version_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,8 +13,8 @@ import ( "fmt" "strconv" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" ) const keyBackupVersionTableSchema = ` diff --git a/userapi/storage/sqlite3/key_changes_table.go b/userapi/storage/sqlite3/key_changes_table.go index 7a4898cfb4..19ac37c4b3 100644 --- a/userapi/storage/sqlite3/key_changes_table.go +++ b/userapi/storage/sqlite3/key_changes_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,10 +12,10 @@ import ( "errors" "fmt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3/deltas" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/userapi/storage/tables" ) var keyChangesSchema = ` diff --git a/userapi/storage/sqlite3/logintoken_table.go b/userapi/storage/sqlite3/logintoken_table.go index 2abdcb95ed..e71fc16edd 100644 --- a/userapi/storage/sqlite3/logintoken_table.go +++ b/userapi/storage/sqlite3/logintoken_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,9 +11,9 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/util" ) diff --git a/userapi/storage/sqlite3/notifications_table.go b/userapi/storage/sqlite3/notifications_table.go index 94d6c7294c..500e374114 100644 --- a/userapi/storage/sqlite3/notifications_table.go +++ b/userapi/storage/sqlite3/notifications_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 Dan Peleg // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -22,10 +14,10 @@ import ( log "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/sqlite3/one_time_keys_table.go b/userapi/storage/sqlite3/one_time_keys_table.go index 2a5b1280bf..0ef4639e65 100644 --- a/userapi/storage/sqlite3/one_time_keys_table.go +++ b/userapi/storage/sqlite3/one_time_keys_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,10 +12,10 @@ import ( "encoding/json" "time" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" ) var oneTimeKeysSchema = ` diff --git a/userapi/storage/sqlite3/openid_table.go b/userapi/storage/sqlite3/openid_table.go index def0074d2b..8636945671 100644 --- a/userapi/storage/sqlite3/openid_table.go +++ b/userapi/storage/sqlite3/openid_table.go @@ -5,9 +5,9 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" log "github.com/sirupsen/logrus" ) diff --git a/userapi/storage/sqlite3/profile_table.go b/userapi/storage/sqlite3/profile_table.go index 7285110bc4..47e98218f1 100644 --- a/userapi/storage/sqlite3/profile_table.go +++ b/userapi/storage/sqlite3/profile_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -19,10 +11,10 @@ import ( "database/sql" "fmt" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/sqlite3/pusher_table.go b/userapi/storage/sqlite3/pusher_table.go index e09f9c78fc..be76f30d17 100644 --- a/userapi/storage/sqlite3/pusher_table.go +++ b/userapi/storage/sqlite3/pusher_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 Dan Peleg // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -21,10 +13,10 @@ import ( "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/storage/sqlite3/registration_tokens_table.go b/userapi/storage/sqlite3/registration_tokens_table.go index 8979547317..302eafbd0d 100644 --- a/userapi/storage/sqlite3/registration_tokens_table.go +++ b/userapi/storage/sqlite3/registration_tokens_table.go @@ -5,10 +5,10 @@ import ( "database/sql" "time" - "github.com/matrix-org/dendrite/clientapi/api" - internal "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/clientapi/api" + internal "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "golang.org/x/exp/constraints" ) diff --git a/userapi/storage/sqlite3/stale_device_lists.go b/userapi/storage/sqlite3/stale_device_lists.go index 5302899f4b..ab8a0f8ef2 100644 --- a/userapi/storage/sqlite3/stale_device_lists.go +++ b/userapi/storage/sqlite3/stale_device_lists.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,11 +12,11 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/userapi/storage/sqlite3/stats_table.go b/userapi/storage/sqlite3/stats_table.go index 71d80d4d41..319939bc41 100644 --- a/userapi/storage/sqlite3/stats_table.go +++ b/userapi/storage/sqlite3/stats_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -23,11 +15,11 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" ) const userDailyVisitsSchema = ` diff --git a/userapi/storage/sqlite3/storage.go b/userapi/storage/sqlite3/storage.go index fc13dde576..c57cc153e7 100644 --- a/userapi/storage/sqlite3/storage.go +++ b/userapi/storage/sqlite3/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -20,12 +12,12 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/userapi/storage/shared" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3/deltas" + "github.com/element-hq/dendrite/userapi/storage/shared" + "github.com/element-hq/dendrite/userapi/storage/sqlite3/deltas" ) // NewUserDatabase creates a new accounts and profiles database diff --git a/userapi/storage/sqlite3/threepid_table.go b/userapi/storage/sqlite3/threepid_table.go index a83f804238..6a0ea78707 100644 --- a/userapi/storage/sqlite3/threepid_table.go +++ b/userapi/storage/sqlite3/threepid_table.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2017 Vector Creations Ltd // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package sqlite3 @@ -18,12 +10,12 @@ import ( "context" "database/sql" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" ) const threepidSchema = ` diff --git a/userapi/storage/storage.go b/userapi/storage/storage.go index 701383fcbf..3536d88ccd 100644 --- a/userapi/storage/storage.go +++ b/userapi/storage/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm @@ -22,12 +14,12 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/storage/postgres" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/storage/postgres" + "github.com/element-hq/dendrite/userapi/storage/sqlite3" ) // NewUserDatabase opens a new Postgres or Sqlite database (based on dataSourceName scheme) diff --git a/userapi/storage/storage_test.go b/userapi/storage/storage_test.go index 5a789dfd79..68198b3794 100644 --- a/userapi/storage/storage_test.go +++ b/userapi/storage/storage_test.go @@ -10,23 +10,23 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/synctypes" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/userapi/types" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "github.com/stretchr/testify/assert" "golang.org/x/crypto/bcrypt" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/pushrules" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal/pushrules" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage" + "github.com/element-hq/dendrite/userapi/storage/tables" ) const loginTokenLifetime = time.Minute diff --git a/userapi/storage/storage_wasm.go b/userapi/storage/storage_wasm.go index cbadd98e94..3a2afdf066 100644 --- a/userapi/storage/storage_wasm.go +++ b/userapi/storage/storage_wasm.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package storage @@ -19,9 +11,9 @@ import ( "fmt" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/storage/sqlite3" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/userapi/storage/tables/interface.go b/userapi/storage/tables/interface.go index 3a0be73e4a..7d4cfbae4b 100644 --- a/userapi/storage/tables/interface.go +++ b/userapi/storage/tables/interface.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package tables @@ -20,14 +12,14 @@ import ( "encoding/json" "time" - "github.com/matrix-org/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - clientapi "github.com/matrix-org/dendrite/clientapi/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/userapi/types" + clientapi "github.com/element-hq/dendrite/clientapi/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/userapi/types" ) type RegistrationTokensTable interface { diff --git a/userapi/storage/tables/stale_device_lists_test.go b/userapi/storage/tables/stale_device_lists_test.go index 09924eb084..a8a9368dc9 100644 --- a/userapi/storage/tables/stale_device_lists_test.go +++ b/userapi/storage/tables/stale_device_lists_test.go @@ -4,15 +4,15 @@ import ( "context" "testing" - "github.com/matrix-org/dendrite/userapi/storage/postgres" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3" + "github.com/element-hq/dendrite/userapi/storage/postgres" + "github.com/element-hq/dendrite/userapi/storage/sqlite3" "github.com/matrix-org/gomatrixserverlib/spec" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi/storage/tables" ) func mustCreateTable(t *testing.T, dbType test.DBType) (tab tables.StaleDeviceLists, close func()) { diff --git a/userapi/storage/tables/stats_table_test.go b/userapi/storage/tables/stats_table_test.go index 61fe026636..0c98c932db 100644 --- a/userapi/storage/tables/stats_table_test.go +++ b/userapi/storage/tables/stats_table_test.go @@ -11,14 +11,14 @@ import ( "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage/postgres" - "github.com/matrix-org/dendrite/userapi/storage/sqlite3" - "github.com/matrix-org/dendrite/userapi/storage/tables" - "github.com/matrix-org/dendrite/userapi/types" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage/postgres" + "github.com/element-hq/dendrite/userapi/storage/sqlite3" + "github.com/element-hq/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/userapi/types" ) func mustMakeDBs(t *testing.T, dbType test.DBType) ( diff --git a/userapi/types/statistics.go b/userapi/types/statistics.go index b74e32addb..235cff78c1 100644 --- a/userapi/types/statistics.go +++ b/userapi/types/statistics.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package types diff --git a/userapi/types/storage.go b/userapi/types/storage.go index 2c918847d3..971f3dc9a3 100644 --- a/userapi/types/storage.go +++ b/userapi/types/storage.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2021 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package types diff --git a/userapi/userapi.go b/userapi/userapi.go index a1c9b94a90..042e2fd922 100644 --- a/userapi/userapi.go +++ b/userapi/userapi.go @@ -1,39 +1,31 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package userapi import ( "time" - fedsenderapi "github.com/matrix-org/dendrite/federationapi/api" - "github.com/matrix-org/dendrite/federationapi/statistics" - "github.com/matrix-org/dendrite/internal/pushgateway" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/setup/process" + fedsenderapi "github.com/element-hq/dendrite/federationapi/api" + "github.com/element-hq/dendrite/federationapi/statistics" + "github.com/element-hq/dendrite/internal/pushgateway" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/setup/process" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/sirupsen/logrus" - rsapi "github.com/matrix-org/dendrite/roomserver/api" - "github.com/matrix-org/dendrite/setup/jetstream" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/consumers" - "github.com/matrix-org/dendrite/userapi/internal" - "github.com/matrix-org/dendrite/userapi/producers" - "github.com/matrix-org/dendrite/userapi/storage" - "github.com/matrix-org/dendrite/userapi/util" + rsapi "github.com/element-hq/dendrite/roomserver/api" + "github.com/element-hq/dendrite/setup/jetstream" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/consumers" + "github.com/element-hq/dendrite/userapi/internal" + "github.com/element-hq/dendrite/userapi/producers" + "github.com/element-hq/dendrite/userapi/storage" + "github.com/element-hq/dendrite/userapi/util" ) // NewInternalAPI returns a concrete implementation of the internal API. Callers diff --git a/userapi/userapi_test.go b/userapi/userapi_test.go index 45762a7d87..6e33ced010 100644 --- a/userapi/userapi_test.go +++ b/userapi/userapi_test.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2020 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package userapi_test @@ -22,10 +14,10 @@ import ( "testing" "time" - api2 "github.com/matrix-org/dendrite/appservice/api" - "github.com/matrix-org/dendrite/clientapi/auth/authtypes" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/userapi/producers" + api2 "github.com/element-hq/dendrite/appservice/api" + "github.com/element-hq/dendrite/clientapi/auth/authtypes" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/userapi/producers" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" @@ -33,12 +25,12 @@ import ( "github.com/nats-io/nats.go" "golang.org/x/crypto/bcrypt" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/internal" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/internal" + "github.com/element-hq/dendrite/userapi/storage" ) const ( @@ -176,7 +168,7 @@ func TestQueryProfile(t *testing.T) { // TestPasswordlessLoginFails ensures that a passwordless account cannot // be logged into using an arbitrary password (effectively a regression test -// for https://github.com/matrix-org/dendrite/issues/2780). +// for https://github.com/element-hq/dendrite/issues/2780). func TestPasswordlessLoginFails(t *testing.T) { ctx := context.Background() test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) { diff --git a/userapi/util/devices.go b/userapi/util/devices.go index 117da08ea9..a5d9cae19f 100644 --- a/userapi/util/devices.go +++ b/userapi/util/devices.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/matrix-org/dendrite/internal/pushgateway" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/internal/pushgateway" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage" "github.com/matrix-org/gomatrixserverlib/spec" log "github.com/sirupsen/logrus" ) diff --git a/userapi/util/notify.go b/userapi/util/notify.go index 45d37525c1..6d3eeacae2 100644 --- a/userapi/util/notify.go +++ b/userapi/util/notify.go @@ -5,9 +5,9 @@ import ( "strings" "time" - "github.com/matrix-org/dendrite/internal/pushgateway" - "github.com/matrix-org/dendrite/userapi/storage" - "github.com/matrix-org/dendrite/userapi/storage/tables" + "github.com/element-hq/dendrite/internal/pushgateway" + "github.com/element-hq/dendrite/userapi/storage" + "github.com/element-hq/dendrite/userapi/storage/tables" "github.com/matrix-org/gomatrixserverlib/spec" log "github.com/sirupsen/logrus" ) diff --git a/userapi/util/notify_test.go b/userapi/util/notify_test.go index 2ea978d692..2844ef636e 100644 --- a/userapi/util/notify_test.go +++ b/userapi/util/notify_test.go @@ -8,19 +8,19 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" - "github.com/matrix-org/dendrite/syncapi/synctypes" + "github.com/element-hq/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/syncapi/synctypes" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" "golang.org/x/crypto/bcrypt" - "github.com/matrix-org/dendrite/internal/pushgateway" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/userapi/api" - "github.com/matrix-org/dendrite/userapi/storage" - userUtil "github.com/matrix-org/dendrite/userapi/util" + "github.com/element-hq/dendrite/internal/pushgateway" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/userapi/api" + "github.com/element-hq/dendrite/userapi/storage" + userUtil "github.com/element-hq/dendrite/userapi/util" ) func queryUserIDForSender(senderID spec.SenderID) (*spec.UserID, error) { diff --git a/userapi/util/phonehomestats.go b/userapi/util/phonehomestats.go index 4bf9a5d886..9d9b469635 100644 --- a/userapi/util/phonehomestats.go +++ b/userapi/util/phonehomestats.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package util @@ -26,9 +18,9 @@ import ( "github.com/sirupsen/logrus" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/setup/config" + "github.com/element-hq/dendrite/userapi/storage" "github.com/matrix-org/gomatrixserverlib/spec" ) diff --git a/userapi/util/phonehomestats_test.go b/userapi/util/phonehomestats_test.go index 191a35c044..7b52c18520 100644 --- a/userapi/util/phonehomestats_test.go +++ b/userapi/util/phonehomestats_test.go @@ -7,13 +7,13 @@ import ( "testing" "time" - "github.com/matrix-org/dendrite/internal/sqlutil" + "github.com/element-hq/dendrite/internal/sqlutil" "golang.org/x/crypto/bcrypt" - "github.com/matrix-org/dendrite/internal" - "github.com/matrix-org/dendrite/test" - "github.com/matrix-org/dendrite/test/testrig" - "github.com/matrix-org/dendrite/userapi/storage" + "github.com/element-hq/dendrite/internal" + "github.com/element-hq/dendrite/test" + "github.com/element-hq/dendrite/test/testrig" + "github.com/element-hq/dendrite/userapi/storage" ) func TestCollect(t *testing.T) { diff --git a/userapi/util/stats.go b/userapi/util/stats.go index 22ef12aad8..aa3f38d2a1 100644 --- a/userapi/util/stats.go +++ b/userapi/util/stats.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm && !windows // +build !wasm,!windows diff --git a/userapi/util/stats_wasm.go b/userapi/util/stats_wasm.go index a182e4e6e5..eb9cedaf1b 100644 --- a/userapi/util/stats_wasm.go +++ b/userapi/util/stats_wasm.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. package util diff --git a/userapi/util/stats_windows.go b/userapi/util/stats_windows.go index 0b3f8d013a..b4f93967e2 100644 --- a/userapi/util/stats_windows.go +++ b/userapi/util/stats_windows.go @@ -1,16 +1,8 @@ +// Copyright 2024 New Vector Ltd. // Copyright 2022 The Matrix.org Foundation C.I.C. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +// Please see LICENSE files in the repository root for full details. //go:build !wasm // +build !wasm