matrix-org / matrix-bifrost

General purpose bridging with a variety of backends including libpurple and xmpp.js
Apache License 2.0
160 stars 31 forks source link

Document setup process better #52

Open aaptel opened 5 years ago

aaptel commented 5 years ago

I just want to talk to xmpp contacts through my existing xmpp account which is on a free xmpp server I do not own. Is this software the best way to do that at the moment?

  backendOpts: <=== no sure what to put here
     # endpoint to reach the component on. The default port is 5347                                                                                                                                                                          
     service: "xmpp://localhost:5347"
     # domin assigned to the component.                                                                                                                                                                                                      
     domain: "matrix.localhost"
     # password needed by the component.                                                                                                                                                                                                     
     password: "jam"

portals:
  # List of regexes to match a alias that can be turned into a bridge.                                                                                                                                                                       
  aliases:
    # This matches _purple_ followed by anything                                                                                                                                                                                             
    "/^_xmpp_(.+)$/":
      # Use the prpl-jabber protocol.                                                                                                                                                                                                        
      protocol: "prpl-jabber" <===== does this need to be changed for xmpp.js?
      properties:
        # Set room to the first regex match                                                                                                                                                                                                  
        room: "regex:1"
        # Set the server to be conf.localhost                                                                                                                                                                                                
        server: "conf.localhost"
Ghabry commented 5 years ago

I couldn't figure out how to use xmpp.js. I was only succesful with libpurple.

backendOpts is only needed for xmpp.js and you need your own server that supports component registration. You must create a new component.

When you want to use a different server use prpl-jabber. You can add an account by talking to the chatbot. I experienced problems when more than one account was added (messages sent through wrong account) and I don't know if this is fixed by now.

aaptel commented 5 years ago

I'm still confused what needs to be run and where :(

I have a free XMPP account from a server I'm not admin (cannot edit the configuration of that XMPP server). Can this software be used in this situation or not?

Ghabry commented 5 years ago

with prpl-jabber: yes

You create an account with a pidgin on your computer. Copy the accounts.xml from pidgin over to $SYNAPSE_USER/.purple/accounts.xml Then start bifrost-purple and message the bridge bot as explained in the README:

accounts add-existing prpl-jabber $USERNAME@$XMPP_SERVER accounts enable prpl-jabber $USERNAME@$XMPP_SERVER

Though you can't write people, they have to write you first, otherwise you won't get a room-handle to answer on.

mcrosson commented 4 years ago

If using prosody you'll likely need to follow the info at this page for setting up a 'custom component'.

Looks like this is a key piece of the docs when setting up xmpp.js as a back end.

https://prosody.im/doc/components