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

Support for huddle threads #46

Merged
merged 4 commits into from
May 8, 2024
Merged

Support for huddle threads #46

merged 4 commits into from
May 8, 2024

Conversation

coltoneshaw
Copy link
Member

@coltoneshaw coltoneshaw commented Jan 11, 2024

Summary

This PR introduces support for slack huddles, which is a new message type. These will be imported to look like a Mattermost call with the thread attachment. I did also find the subtype sh_room_created which appears to be huddles without a threaded reply. Currently those are disregarded, but support could be added.

Screenshot 2024-01-11 at 11 48 14 AM

Huddle thread syntax in the slack export is below. All huddles seem to belong to USLACKBOT but have a creator in the room.

 {
    "type": "message",
    "text": "",
    "user": "USLACKBOT",
    "channel": "REDACTED",
    "room": {
        "id": "REDACTED",
        "name": "",
        "media_server": "",
        "created_by": "REDACTED",
        "date_start": 1687381097,
        "date_end": 1687387089,
        "participants": [],
        "participant_history": [
            "REDACTED",
            "REDACTED"
        ],
        "participants_camera_on": [],
        "participants_camera_off": [],
        "participants_screenshare_on": [],
        "participants_screenshare_off": [],
        "canvas_thread_ts": "1687381097.297369",
        "thread_root_ts": "1687381097.297369",
        "channels": [
            "REDACTED"
        ],
        "is_dm_call": false,
        "was_rejected": false,
        "was_missed": false,
        "was_accepted": false,
        "has_ended": true,
        "is_prewarmed": false,
        "is_scheduled": false,
        "attached_file_ids": [],
        "media_backend_type": "free_willy",
        "display_id": "",
        "external_unique_id": "REDACTED",
        "app_id": "A00",
        "call_family": "huddle",
        "pending_invitees": {}
    },
    "no_notifications": true,
    "permalink": "REDACTED",
    "subtype": "huddle_thread",
    "ts": "1687381097.297369",
    "blocks": [],
    "team": "REDACTED",
    "user_team": "REDACTED",
    "source_team": "REDACTED",
    "user_profile": {
        "avatar_hash": "sv41d8cd98f0",
        "image_72": "https:\/\/a.slack-edge.com\/80588\/img\/slackbot_72.png",
        "first_name": "slackbot",
        "real_name": "Slackbot",
        "display_name": "Slackbot",
        "team": "REDACTED",
        "name": "slackbot",
        "is_restricted": false,
        "is_ultra_restricted": false
    }
}

I also uncommented the Type information, so these can be imported as custom_calls and render the nice Calls UI.

@coltoneshaw
Copy link
Member Author

coltoneshaw commented Jan 11, 2024

I guess i fixed it ?

They seem to pass locally.

🤔

go test -v ./commands/transform_slack_e2e_test.go                                                                     node system
=== RUN   TestYourCommandFunction
=== RUN   TestYourCommandFunction/valid
--- PASS: TestYourCommandFunction (0.01s)
    --- PASS: TestYourCommandFunction/valid (0.01s)
PASS
ok      command-line-arguments  0.191s

services/slack/intermediate.go Show resolved Hide resolved
services/slack/intermediate.go Outdated Show resolved Hide resolved
@hanzei hanzei added the 2: Dev Review Requires review by a core committer label Jan 23, 2024
@coltoneshaw coltoneshaw merged commit 8f03695 into master May 8, 2024
2 checks passed
@coltoneshaw coltoneshaw deleted the support_slack_huddles branch May 8, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants