Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Fediverse
  3. Sending a private message without cc causes a 500 error

Sending a private message without cc causes a 500 error

Scheduled Pinned Locked Moved Fediverse
23 Posts 5 Posters 31 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nutomic@lemmy.mlN [email protected]

    FYI the next Lemmy version will use Create/Note for private messages. You can test it on voyager.lemmy.ml

    https://github.com/LemmyNet/lemmy/pull/5221

    julian@community.nodebb.orgJ This user is from outside of this forum
    julian@community.nodebb.orgJ This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #10

    @[email protected] thanks for the update! That's awesome to hear

    1 Reply Last reply
    0
    • freamon@community.nodebb.orgF This user is from outside of this forum
      freamon@community.nodebb.orgF This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #11

      @julian I've added support to PieFed to successfully receive Create / Note as a PM from NodeBB.

      From Nutomic's PR, it looks like you'll continue you get Create / ChatMessage from them, as also you will from PieFed. This currently fails, as I guess that it converts them into a Create / Note, but then complains of there being no 'cc'.

      It doesn't make sense for PMs to be 'carbon copied' to anyone, so I'll raise an Issue at your repo.

      1 Reply Last reply
      0
      • julian@community.nodebb.orgJ This user is from outside of this forum
        julian@community.nodebb.orgJ This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #12

        @freamon thanks! Happy to look into handling Create(ChatMessage)... I think the error aside, NodeBB would drop it anyway since ChatMessage isn't an expected post type.

        1 Reply Last reply
        0
        • freamon@community.nodebb.orgF This user is from outside of this forum
          freamon@community.nodebb.orgF This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #13

          @julian Oh, I've just realised I read Nutomic's PR the wrong way around. After 2.0, you'll start getting Notes from them. If 'ChatMessage' processing isn't worth handling by NodeBB, I can change PieFed to send you Notes instead.

          1 Reply Last reply
          0
          • R This user is from outside of this forum
            R This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #14

            @freamon As others have said, ChatMessage is non-standard. The Create/Note is not particularly great for private messages, but whatever. Anyway, cc is not a required field of Note nor Create, so any software that would complain has a bug.

            1 Reply Last reply
            0
            • freamon@community.nodebb.orgF This user is from outside of this forum
              freamon@community.nodebb.orgF This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #15

              @rikudou Yeah, sorry, I didn't mean to derail this thread. The GitHub issue was intended to only really be about the 'cc' problem, because it looks like PieFed will have to start sending Create/Note to non-Lemmy platforms anyway, but it'd easier if 'cc' doesn't have to be artificially included to keep NodeBB happy.

              1 Reply Last reply
              0
              • julian@community.nodebb.orgJ This user is from outside of this forum
                julian@community.nodebb.orgJ This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #16

                @freamon @rikudou

                https://github.com/NodeBB/NodeBB/issues/13202

                1 Reply Last reply
                0
                • julian@community.nodebb.orgJ This user is from outside of this forum
                  julian@community.nodebb.orgJ This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #17

                  In a bit of code that is too clever for my own good, I collapse to and cc into a single deduplicated array with:

                  const recipients = new Set([...object.to, ...object.cc]);

                  Which of course assumes that both properties are iterable. That has now been changed to an even clever-er (and less readable):

                  const recipients = new Set([...(object.to || []), ...(object.cc || [])]);

                  😎

                  1 Reply Last reply
                  0
                  • R This user is from outside of this forum
                    R This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #18

                    @julian Wouldn't ?? be better?

                    1 Reply Last reply
                    0
                    • julian@community.nodebb.orgJ This user is from outside of this forum
                      julian@community.nodebb.orgJ This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #19

                      @rikudou maybe? Nullish coalescing sounds really cool, but I've avoided it for years because of browser compatibility.

                      Node has had support forever (since v14, I've discovered), but I just don't know how to use it is all 😄

                      1 Reply Last reply
                      0
                      • nutomic@lemmy.mlN [email protected]

                        FYI the next Lemmy version will use Create/Note for private messages. You can test it on voyager.lemmy.ml

                        https://github.com/LemmyNet/lemmy/pull/5221

                        edie@lemmy.mlE This user is from outside of this forum
                        edie@lemmy.mlE This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #20

                        It seems all of the test instances are down? I get a 502 no matter which of voyager.lemmy.ml, enterprise.lemmy.ml, and ds9.lemmy.ml I try to open

                        nutomic@lemmy.mlN 1 Reply Last reply
                        0
                        • edie@lemmy.mlE [email protected]

                          It seems all of the test instances are down? I get a 502 no matter which of voyager.lemmy.ml, enterprise.lemmy.ml, and ds9.lemmy.ml I try to open

                          nutomic@lemmy.mlN This user is from outside of this forum
                          nutomic@lemmy.mlN This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #21

                          Yes not sure whats wrong there, the server was using a lot of cpu for no reason. Restart fixed it for now, let me know if it happens again.

                          edie@lemmy.mlE 1 Reply Last reply
                          0
                          • nutomic@lemmy.mlN [email protected]

                            Yes not sure whats wrong there, the server was using a lot of cpu for no reason. Restart fixed it for now, let me know if it happens again.

                            edie@lemmy.mlE This user is from outside of this forum
                            edie@lemmy.mlE This user is from outside of this forum
                            [email protected]
                            wrote last edited by
                            #22

                            Voyager still has an issue, but the others seem to work now

                            nutomic@lemmy.mlN 1 Reply Last reply
                            0
                            • edie@lemmy.mlE [email protected]

                              Voyager still has an issue, but the others seem to work now

                              nutomic@lemmy.mlN This user is from outside of this forum
                              nutomic@lemmy.mlN This user is from outside of this forum
                              [email protected]
                              wrote last edited by
                              #23

                              That instance runs Lemmy 1.0 which is still in alpha state, and the frontend is not compatible yet. So only the api works there.

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups