Skip to content
This repository has been archived by the owner on Oct 20, 2018. It is now read-only.

Make camperbot welcome people over DM #128

Open
raisedadead opened this issue Feb 4, 2017 · 9 comments
Open

Make camperbot welcome people over DM #128

raisedadead opened this issue Feb 4, 2017 · 9 comments

Comments

@raisedadead
Copy link
Member

Refers : #117 (comment)
CamperBot should respond back with official chat rooms and resources.

@dhcodes
Copy link
Contributor

dhcodes commented Mar 10, 2017

@raisedadead is this possible? the gitter api doesn't seem to allow private messages and you can use /query @mention to start a message but you have to push enter first. I'm looking into using a recursive function to make it work but haven't been successful so far

@t3h2mas
Copy link
Contributor

t3h2mas commented Mar 10, 2017

Confirmed the lack of private messages https://developer.gitter.im/docs/messages-resource

@dhcodes what are you using to simulate key presses, and is it allowed in gitters TOS?

@dhcodes
Copy link
Contributor

dhcodes commented Mar 15, 2017

@t3h2mas haven't gotten that far yet and I am not sure. I'll do some quick reading and some more experimenting soon. Feel free to jump in and do the same; I'm not sure how much time I'll have to work on this.

@t3h2mas
Copy link
Contributor

t3h2mas commented Mar 15, 2017

@dhcodes it's my opinion that if gitter doesn't provide the API, then we shouldn't bother. Going around it could be troublesome and could change if anything on their end is updated without us knowing. Alternatively, what about contacting gitter and asking for the feature?

@dhcodes
Copy link
Contributor

dhcodes commented Mar 15, 2017

I'm of the same mindset @t3h2mas. I'll reach out to Gitter about this. I suspect their fear is that if it's a private message, it's harder for mods to know/justify banning someone for sending spam/malicious content. But worth the ask.

@dhcodes
Copy link
Contributor

dhcodes commented Mar 15, 2017

On the way to emailing them, I found this: http://blog.gitter.im/2017/03/15/gitter-gitlab-acquisition/

Looks like it will all be open-source soon. In the meantime, I'll ask about PM support via API in the GitterHQ room.

@dhcodes
Copy link
Contributor

dhcodes commented Mar 15, 2017

I stand corrected. According to a dev in the GitterHQ room, the API should work as-is for private messages. He/she directed me to: https://developer.gitter.im/docs/messages-resource#send-a-message

I'll try it soon, but anyone else is welcome to as well.

@dhcodes
Copy link
Contributor

dhcodes commented Mar 17, 2017

Update: I've got this mostly working. Will try to refactor and post it over the weekend.

@dhcodes
Copy link
Contributor

dhcodes commented Mar 28, 2017

I'm no longer sure if this is possible. I've been able to send DMs to individuals but only if they already have a one-to-one chat with my bot. I believe the room (even the DM room) must already exist in order to send messages via the API and you cannot create a room via the API based on this line in the Rooms documentation:

Create a Room

This is a private API. You need to use the Gitter ecosystem to create a room.

I have a message out to the GitterHQ chat room to confirm. So we may need to rethink how we do this.

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

No branches or pull requests

3 participants