-
Notifications
You must be signed in to change notification settings - Fork 72
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
Reactions bridging #131
Reactions bridging #131
Conversation
6a1fe7f
to
a1f03ab
Compare
59131a0
to
02fa7f3
Compare
I am not sure I can quite get the aggregations stuff in synapse to play ball for this, but I am trying. |
f587b43
to
996ace7
Compare
it seems matrix -> slack reaction removal might be broken. |
996ace7
to
a21082e
Compare
So it seems that slack has alternative names for a bunch of emoji i.e AHGHGGGGHHHHHHHLLLLLL |
Fixed. |
ec91cdd
to
77a5ed1
Compare
this is now based on #153 |
Only adding is possible at this point
it sucks though
Hopefully this is rather more reliable and also now it correctly handles skin tone modifiers
77a5ed1
to
a5d381d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good
lib/BridgedRoom.js
Outdated
|
||
// TODO: This only works once from matrix as we are sending the event as the | ||
// bot user. | ||
var body = {channel: this._slack_channel_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VAR
lib/BaseSlackHandler.js
Outdated
return message; | ||
} | ||
|
||
// match all channelIds | ||
var testForName = message.text.match(CHANNEL_ID_REGEX); | ||
var testForName = text.match(CHANNEL_ID_REGEX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VAR
lib/BridgedRoom.js
Outdated
@@ -190,6 +191,58 @@ BridgedRoom.prototype.toEntry = function() { | |||
return entry; | |||
}; | |||
|
|||
BridgedRoom.prototype.onMatrixReaction = async function(message) { | |||
if (!this._slack_bot_token) return Promise.resolve(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an async function, just return
lib/BridgedRoom.js
Outdated
// Then we walk that list and find the one with the sender we care about, and return that event. | ||
|
||
// TODO: Not sure this works, having trouble testing it against a sufficiently new synapse. | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please just remove the func if it doesn't work. I'm not sure it's worth bloating the code base out with future things if the spec isn't even merged yet.
lib/SlackEventHandler.js
Outdated
@@ -146,7 +152,7 @@ SlackEventHandler.prototype.doChannelUserReplacements = async function(msg, text | |||
* @param {string} params.event.ts The unique (per-channel) timestamp | |||
*/ | |||
SlackEventHandler.prototype.handleMessageEvent = async function (params) { | |||
var room = this._main.getRoomBySlackChannelId(params.event.channel); | |||
var room = this._main.getRoomBySlackChannelId(params.event.channel || params.event.item.channel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VAR
FYI, we decided to not do redactions of reactions slack -> matrix because it involves having to listen for your own reactions over the events API and it can wait for a future PR. |
builds on #130 which builds on #129TODO: