Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NostrMedia.com as media uploader option #2571

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Spl0itable
Copy link

Summary

I do not believe a SoB is necessary for this small merge request? I'm also not a Swift dev nor mobile app dev, but the code's logic seemed fairly easy to replicate in order to add edits. Please correct if not accurate and if there are other required file edits necessary. However, I could not find the "Appearance" UI that controlled the drop-down menu in user settings in order to add an option for NostrMedia.com.

Interestingly, I couldn't find the file that controls where "nostrimg.com" is even listed, which appears like it should be deprecated as "nostrimg.com" is no longer a functioning website. Yet, the option for "nostrimg.com" still exists even in the current production v1.10.1 build released in App Store. (see screenshots below)
damus1
damus2

Changelog-Added: media uploader support for NostrMedia.com

Checklist

  • [✅ ] I have read (or I am familiar with) the Contribution Guidelines
  • [❌ ] I have tested the changes in this PR
  • [✅ ] My PR is either small, or I have split it into smaller logical commits that are easier to review
  • [❌ ] I have added the signoff line to all my commits. See Signing off your work
  • [✅ ] I have added appropriate changelog entries for the changes in this PR. See Adding changelog entries
    • I do not need to add a changelog entry. Reason: [Please provide a reason]
  • [❌ ] I have added appropriate Closes: or Fixes: tags in the commit messages wherever applicable, or made sure those are not needed. See Submitting patches

Test report

N/A -- not a mobile app dev and this change seems small enough to not warrant a full blown emulator test. NostrMeida.com API endpoint supports NIP-98 and NIP-96 as well as Blossom. So, if the POST and/or PUT requests are structured to spec, then there shouldn't be an issue with passing uploads or having the uploaded file URL returned in response.

Other notes

Please let me know if there's anything else required in order to get NostrMedia.com added as a media upload provider. Thank you!

Copy link
Contributor

@danieldaquino danieldaquino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Spl0itable, thank you for your PR! Code changes look mostly ok, but there are some things that need to be addressed:

[❌ ] I have tested the changes in this PR

Test report

N/A -- not a mobile app dev and this change seems small enough to not warrant a full blown emulator test. NostrMeida.com API endpoint supports NIP-98 and NIP-96 as well as Blossom. So, if the POST and/or PUT requests are structured to spec, then there shouldn't be an issue with passing uploads or having the uploaded file URL returned in response.

Even though Damus and nostrmedia.com communicate using the same protocols, it's important to try out the new media uploader option to see if there is any unexpected behavior.

We don't need a full blown test, but it would help us to understand how you tested the changes to ensure they work (e.g. Have you tried uploading images into a new post using this new option to see if it works?).

[✅] My PR is either small, or I have split it into smaller logical commits that are easier to review

The PR currently contains two commits with the same message. Can we please squash commits?

[❌ ] I have added the signoff line to all my commits. See Signing off your work

Please add the signoff line as per our contribution guidelines. Please read Signing off your work

[✅ ] I have added appropriate changelog entries for the changes in this PR. See Adding changelog entries

This PR introduces a user-facing change, and the changelog entry is missing. Please see Adding changelog entries

[❌ ] I have added appropriate Closes: or Fixes: tags in the commit messages wherever applicable, or made sure those are not needed. See Submitting patches

This item is not needed for this PR.

On top of the above items, I also added one inline code comment.

Please let me know if you have any questions. Thank you!

@@ -11,6 +11,7 @@ enum MediaUploader: String, CaseIterable, Identifiable, StringCodable {
var id: String { self.rawValue }
case nostrBuild
case nostrcheck
case nostrMedia // New case for nostrMedia
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code comment can be removed.

@danieldaquino
Copy link
Contributor

@Spl0itable, to help illustrate our guidelines with a reference, here is one recent example of a pull request that follows the guidelines: #2570

Please let me know if you have any questions, I would be happy to clarify them. Thanks!

@Spl0itable
Copy link
Author

Thanks @danieldaquino

I did include the changelog entry.

No worries, I'll test in emulator to confirm and correct the other requirements.

Cheers

@danieldaquino
Copy link
Contributor

I did include the changelog entry.

@Spl0itable, ah I see what happened, I think there was a misunderstanding.

I just noticed that you indeed have the changelog entry on your PR message, but we actually need them to be on the commit message itself. I apologize if that part of the guidelines wasn't clear.

The reason we need them on the commit message is so that a script can pick them up and help us save us time when writing the changelog for users after each release.

Your changelog line looks good, so we just need to move it to the commit message. You can try running $ git commit --amend to edit the commit message on your default text editor, and then copy/paste the line there.

Please let me know if there is anything else I can help with!

@danieldaquino
Copy link
Contributor

No worries, I'll test in emulator to confirm and correct the other requirements.

Thank you! I appreciate it 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants