Overseer sending a blank message on discord when new movie / Tv has been added to plex - discord

I have overseerr set up to send a message on discord when a movie / Tv show is available on plex. A few months back it stopped working, just had not had time to look into it. This is the default json in overseerr
{
"notification_type": "{{notification_type}}",
"event": "{{event}}",
"subject": "{{subject}}",
"message": "{{message}}",
"image": "{{image}}",
"{{media}}": {
"media_type": "{{media_type}}",
"tmdbId": "{{media_tmdbid}}",
"tvdbId": "{{media_tvdbid}}",
"status": "{{media_status}}",
"status4k": "{{media_status4k}}"
},
"{{request}}": {
"request_id": "{{request_id}}",
"requestedBy_email": "{{requestedBy_email}}",
"requestedBy_username": "{{requestedBy_username}}",
"requestedBy_avatar": "{{requestedBy_avatar}}"
},
"{{issue}}": {
"issue_id": "{{issue_id}}",
"issue_type": "{{issue_type}}",
"issue_status": "{{issue_status}}",
"reportedBy_email": "{{reportedBy_email}}",
"reportedBy_username": "{{reportedBy_username}}",
"reportedBy_avatar": "{{reportedBy_avatar}}"
},
"{{comment}}": {
"comment_message": "{{comment_message}}",
"commentedBy_email": "{{commentedBy_email}}",
"commentedBy_username": "{{commentedBy_username}}",
"commentedBy_avatar": "{{commentedBy_avatar}}"
},
"{{extra}}": []
}
In the logs, I see this error code 400 and 50006
Can anyone advise on how to fix the code? Many thanks

Related

Instagram: invalid message data error while trying to send pushback buttons

Using https://graph.facebook.com/v13.0/me/messages?access_token=pagetoken post url trying to send pushback buttons. But its gives error as:
"message": "(#100) Invalid message data",
"type": "OAuthException",
"code": 100,
"error_subcode": 2534015
**Request-body:**
{
"recipient":{
"id":"PSID"
},
"message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"button",
"text":"Try the postback button!",
"buttons":[
{
"type":"postback",
"title":"Postback Button",
"payload":"DEVELOPER_DEFINED_PAYLOAD"
}
]
}
}
}
}
This one is not supported by instagram anymore, try generic type with post back button https://developers.facebook.com/docs/messenger-platform/instagram/features/generic-template

why socket.io listining multipal request but we send single request to server in react native

sir i'm creating chat app in react-native with socket.io
every thing connected good. but when we hit send button to send message to other user,than listener function
// listen other user Message
socket.on('chatMessage2', function (otherUserDAta) {
const newChatData = {
"name": otherUserDAta.name,
"msg": otherUserDAta.msg,
"type": otherUserDAta.type,
"time": otherUserDAta.time
}
setChat(oldArray => [...oldArray, newChatData])
console.log("|otherUserDAta", otherUserDAta)
})
Are listing multipal time a signal message and they print multipal time in screen.
Here is Send message function :
const sendMessage = useCallback(() => {
if (typedMessge !== '') {
const newChatData = {
"name": user,
"msg": typedMessge,
"type": "1",
"time": formatAMPM(new Date)
}
socket.emit('chatMessage1', {
"name": user,
"msg": typedMessge,
"type": "2",
"time": formatAMPM(new Date)
});
setChat(oldArray => [...oldArray, newChatData])
settypedMessge('')
}
console.log(" im chatMess1")
}, [typedMessge])
I have called socket server at the top of main function :
Socket.io server Sending That Message One time to BroadCast to all user
how to solve that problem

Firebase Cloud Firestore - Fail to write via REST API

This is not an authentication error, write is enabled on the database rules.
My cloud Firestore database looks like the picture below.
There is a COLLECTION called colA, inside it there is a DOCUMENT called docA, and inside it there are some fields (strings) stored.
On Postman, if I do GET https://firestore.googleapis.com/v1/projects/eletronica-ab6b1/databases/(default)/documents/colA/docA, I do receive the following answer, and it is correct:
{
"name": "projects/eletronica-ab6b1/databases/(default)/documents/colA/docA",
"fields": {
"fieldB": {
"stringValue": "ABCD"
},
"fieldA": {
"stringValue": "888"
}
},
"createTime": "2020-01-31T16:48:26.859181Z",
"updateTime": "2020-02-05T19:21:49.654340Z"
}
Now, when I try to write a new field (fieldC) via POST https://firestore.googleapis.com/v1/projects/eletronica-ab6b1/databases/(default)/documents/colA/docA, with JSON content:
{
"name": "projects/eletronica-ab6b1/databases/(default)/documents/colA/docA",
"fields": {
"fieldC": {
"stringValue": "1000"
}
}
}
After SEND, I receive this:
{
"error": {
"code": 400,
"message": "Document parent name \"projects/eletronica-ab6b1/databases/(default)/documents/colA\" lacks \"/\" at index 60.",
"status": "INVALID_ARGUMENT"
}
}
What I'm doing wrong? I really would like to write strings there via REST API.
Regards.
Updating a document is done with a PATCH request, according to the [reference documentation).
A POST request is used to create a new document in a collection, which probably explains the error you get: you're pointing to a document, but POST expects a collection path.

How to show the current playing item (song) in player or queue screen in alexa app

I am able to send the songs to amazon echo devices and the song is playing. I am not understanding what i have to send to show the song in the player or queue screen in alexa app as it is coming to other music apps like saavn, spotify etc. Please let me know if there are any link or info regarding this.
]1
Check out Amazon's AudioPlayer Interface Reference. It gives a pretty comprehensive guide on how to make the audio interface work. Essentially, it boils down to adding another directive to the list of directives you're returning in your response JSON. For me, this will automatically come up with the audio player screen.
A basic version of the audio directive looks like the following:
{
"type": "AudioPlayer.Play",
"playBehavior": "ENQUEUE",
"audioItem": {
"stream": {
"token": "Audio Playback",
"url": "http://www.audio.com/this/is/the/url/to/the/audio",
"offsetInMilliseconds": 0
}
}
}
ENQUEUE adds the specified stream to the end of the current stream queue. The offsetInMilliseconds key sets how far into the stream (in milliseconds) playback should begin.
When you nest this into the larger response JSON, it takes on the form of following:
{
"version": "1.0",
"sessionAttributes": {},
"response": {
"outputSpeech": {},
"card": {},
"reprompt": {},
"directives": [
{
"type": "AudioPlayer.Play",
"playBehavior": "ENQUEUE",
"audioItem": {
"stream": {
"token": "Audio Playback",
"url": "http://www.audio.com/this/is/the/url/to/the/audio",
"offsetInMilliseconds": 0
}
}
}
],
"shouldEndSession": true
}
}
There are a handful of other options to include in your audio directive. These can be found in the link I mentioned above.
I find it most beneficial to make a function where you can pass in given values to create the AudioPlayer directive JSON. For example, in python, this may look like the following:
def build_audio_directive(play_behavior, token, url, offset)
return {
"type": "AudioPlayer.Play",
"playBehavior": play_behavior,
"audioItem": {
"stream": {
"token": token,
"url": url,
"offsetInMilliseconds": offset
}
}
}
There are multiple ways to build up the response, but I find this way is the easiest for me to visualize.

Fetching Facebook Timeline posts using Facebook API

I'm facing following issues while fetching facebook user/pages/group timeline posts:
I'm not getting all information (photos urls, link, created_time, etc) in posts objects retrieved using this. Following is a sample response of this api:
[
{
"message": "this is going to be real fun https://localhost.com/N1AyEvZp",
"story": "Rajveer Singh added photos to XYZ Photos in My-group.",
"updated_time": "2015-09-03T16:27:34+0000",
"id": "405944472923733_413853035466210"
},
{
"message": "this is going to be fun https://localhost.com/EJo1WvZp",
"story": "Rajveer Singh added photos to XYZ Photos in My-group.",
"updated_time": "2015-09-03T16:14:41+0000",
"id": "405944472923733_413848848799962"
},
{
"message": "this is going to be some real funhttps://localhost.com/VyVKdWga",
"story": "Rajveer Singh added photos to XYZ Photos in My-group.",
"updated_time": "2015-09-02T15:45:08+0000",
"id": "405944472923733_413582785493235"
}
]
This response is missing the photo urls, links, captions, etc from the posts. Is there any different api for fetching those informations ? Also, if I directly hit the one of the post object /405944472923733_413582785493235 then I get following response:
{
"created_time": "2015-09-02T15:45:07+0000",
"message": "this is going to be some real funhttps://localhost.com/VyVKdWga",
"story": "Rajveer Singh added photos to XYZ Photos in My-group.",
"id": "405944472923733_413582785493235"
}
Though I get created_time in this response but pictures, urls, are still missing. I found this api deprecated. Is there any different api which can give me all the info ?
The above response is also missing comments and replies. On google search I found that we can get comments using /405944472923733_413582785493235/comments api but again that api doesn't mention the exact comments count. Also, the api doesn't give all the comments in a single api call. They have a pagination kind of thing. Can anyone tell me how can I get exact count of comments, replies to comments, and retrieve all the comments in a single api call. If we can't retrieve all the comments in a single go, then how can we use pagination ? I need to send all the comments related to a post to my front-end. with pagination, how can I achieve that ? Do I need to store the previous/next urls somewhere in front-end ? Following is a sample response of this:
{
"data": [
{
"id": "[post_id]",
"from": {
"name": "[name]",
"id": "[id]"
},
"message": "[message]",
"created_time": "2011-01-23T02:36:23+0000"
},
{
"id": "[id]",
"from": {
"name": "[name]",
"id": "[id]"
},
"message": "[message]",
"created_time": "2011-01-23T05:16:56+0000"
}
],
"paging": {
"cursors": {
"after": "WTI5dGJXVnVkRjlqZFhKemIzSTZOREUzTVRJeE5qWTRORGN5Tmpnd09qRTBOREl3T0RRd09URT0=",
"before": "WTI5dGJXVnVkRjlqZFhKemIzSTZOREUzTVRFNU16RTRORGN5T1RFMU9qRTBOREl3T0RRd05qZz0="
},
"previous": "previousUrl",
"next": "nextUrl"
}
How to get count of all the likes and shares of a post ? I simply want the count and doesn't want who actually likes/shared the post. How can I get that ? I found that using /likes gives a list of all those who liked the post but it doesn't give the count. Following is a sampple response of that:
{
"data": [
{
"id": "824565440992306"
}
],
"paging": {
"cursors": {
"after": "ODI0NTY1NDQwOTkyMzA2",
"before": "ODI0NTY1NDQwOTkyMzA2"
}
}
}
General Information:
I'm using Node.js Javascript SDK for hitting FB APIs.
I'm using correct access token, so that's not an issue for sure.
I have gone through this and this but didn't get any help from them.
I need all the information related to wall posts on my back-end so that I can send all data to my front-end for proper rendering. This is a screenshot of my front-end and all the information which I need in front-end.
Can anyone please try to clear my doubts ?
Also, if there is any optimized way of fetching all this information, then please do suggest. Your suggestions are welcome.

Resources