Skip to content

Commit d83af47

Browse files
committed
Fixes and Rate Limits
1. noPing userstate value no longer will display mentions 2. Emojis with & will no longer display weirdly 3. Moved mentions in title to replaceWithEmotes function 4. Mentions in title without @ will no longer work 5. Any mention in title will lead into the channel page 6. Lowered reply preview from 100 to 45 characters 7. Fixed reply button and message time being able to display 2 times 8. Chat settings will no longer display the minutes if the follow time is set to 0 minutes 9. Testing rate limitation for sending messages 10. Removed not needed part of code 11. If failed to fetch, the points_image and redeem_image will display the default bubble 12. Fixed Chinese names embeding into the username in usercard 13. Hopefully fixed redirect back after logging in BETA FEATURES: 1. Nothing was put into beta Some features are in beta due to numerous bugs and errors in the development process. To access anything in beta, head over to settings and enable beta features, refresh is sometimes needed.
1 parent bd73f8f commit d83af47

4 files changed

Lines changed: 142 additions & 74 deletions

File tree

src/channel/SevenTVHelperV2.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,26 @@ async function getUsersCosmetics(names) {
231231
badge_id: item.body.object.data.user.style?.badge_id
232232
};
233233
});
234-
}
234+
}
235+
236+
async function notifyWebSocket(seventTV_id, twitchChannel_id) {
237+
if (!seventTV_id || !twitchChannel_id) { return; }
238+
239+
const response = await fetch(`https://7tv.io/v3/users/${seventTV_id}/presences`, {
240+
method: 'POST',
241+
headers: {
242+
"Content-Type": "application/json"
243+
},
244+
body: JSON.stringify({
245+
"kind": 1,
246+
"passive": true,
247+
"session_id": "",
248+
"data": {
249+
"platform": "TWITCH",
250+
"id": String(twitchChannel_id)
251+
}
252+
})
253+
});
254+
255+
if (!response.ok) { handleMessage(custom_userstate.SevenTV, "Failed to notify the 7TV websocket about your presence."); return; }
256+
}

0 commit comments

Comments
 (0)